https://www.luogu.org/problemnew/show/P1603

有毒,大小写不检测,句号也不管。

#include<bits/stdc++.h>
using namespace std;
#define ll long long int num[];
int top=; char s[]; int tonum(){
int n=strlen(s);
if(strcmp(s,"one")==)
return ;
else if(strcmp(s,"two")==)
return ;
else if(strcmp(s,"three")==)
return ;
else if(strcmp(s,"four")==)
return ;
else if(strcmp(s,"five")==)
return ;
else if(strcmp(s,"six")==)
return ;
else if(strcmp(s,"seven")==)
return ;
else if(strcmp(s,"eight")==)
return ;
else if(strcmp(s,"nine")==)
return ;
else if(strcmp(s,"ten")==)
return ;
else if(strcmp(s,"eleven")==)
return ;
else if(strcmp(s,"twelve")==)
return ;
else if(strcmp(s,"thirteen")==)
return ;
else if(strcmp(s,"fourteen")==)
return ;
else if(strcmp(s,"fifteen")==)
return ;
else if(strcmp(s,"sixteen")==)
return ;
else if(strcmp(s,"seventeen")==)
return ;
else if(strcmp(s,"eighteen")==)
return ;
else if(strcmp(s,"nineteen")==)
return ;
else if(strcmp(s,"twenty")==)
return ;
else if(strcmp(s,"a")==)
return ;
else if(strcmp(s,"another")==)
return ;
else if(strcmp(s,"first")==)
return ;
else if(strcmp(s,"both")==)
return ;
else if(strcmp(s,"second")==)
return ;
else if(strcmp(s,"third")==)
return ;
return ;
} ll ans; void solve(){
for(int i=;i<;i++){
num[i]=(num[i]*num[i])%;
} sort(num,num+); ll sum=;
for(int i=;i<;i++){
sum=sum*+num[i];
} ans=sum;
} int main(){
for(int i=;i<;i++){
scanf("%s",s);
int n=strlen(s);
for(int j=;j<n;j++){
s[j]=tolower(s[j]);
if(s[j]=='.')
s[j]='\0';
}
num[top++]=tonum();
}
solve();
printf("%lld\n",ans);
}

(水题)洛谷 - P1603 - 斯诺登的密码的更多相关文章

  1. (Java实现) 洛谷 P1603 斯诺登的密码

    题目背景 根据斯诺登事件出的一道水题 2013年X月X日,俄罗斯办理了斯诺登的护照,于是他混迹于一架开往委内瑞拉的飞机.但是,这件事情太不周密了,因为FBI的间谍早已获悉他的具体位置--但这不是最重要 ...

  2. 洛谷P1603 斯诺登的密码(水题

    不知道什么时候打开的,随手做掉了,没什么用...大概又熟悉了一下map吧...大概........一开始还因为没读清题没把非正规的英文表示数字存进去wa了...orz最近状态不行 题目描述 题目描述 ...

  3. 洛谷P1603——斯诺登的密码(字符串处理)

    https://www.luogu.org/problem/show?pid=1603#sub 题目描述 2013年X月X日,俄罗斯办理了斯诺登的护照,于是他混迹于一架开往委内瑞拉的飞机.但是,这件事 ...

  4. 洛谷 P1603 斯诺登的密码

    我一开始还没看懂非正规数字的意义,以为那里写的单词不算,蒙了好久,而且这题非常考验仔细程度,一不小心就RE,WA. 嗯,好像讲了些废话,那我们看看思路,我的做法和前面的大佬们有些不同,因为这题只有六个 ...

  5. 洛谷P1603 斯诺登的密码

    https://www.luogu.org/problem/P1603 #include<bits/stdc++.h> using namespace std; struct s { st ...

  6. P1603 斯诺登的密码

    题目背景 根据斯诺登事件出的一道水题 题目描述 题目描述 2013年X月X日,俄罗斯办理了斯诺登的护照,于是他混迹于一架开往委内瑞拉的飞机.但是,这件事情太不周密了,因为FBI的间谍早已获悉他的具体位 ...

  7. 洛谷 P1703 那个什么密码2

    P1703 那个什么密码2 题目背景 https://www.luogu.org/problem/show?pid=1079 题目描述 与原题一模一样.具体不同请见输入格式 输入输出格式 输入格式: ...

  8. P1603 斯诺登的密码(JAVA语言)

    //这题有点坑 题目背景 根据斯诺登事件出的一道水题 题目描述 题目描述 2013年X月X日,俄罗斯办理了斯诺登的护照,于是他混迹于一架开往委内瑞拉的飞机.但是,这件事情太不周密了,因为FBI的间谍早 ...

  9. 2018.10.30 一题 洛谷4660/bzoj1168 [BalticOI 2008]手套——思路!问题转化与抽象!+单调栈

    题目:https://www.luogu.org/problemnew/show/P4660 https://www.lydsy.com/JudgeOnline/problem.php?id=1168 ...

随机推荐

  1. BZOJ 题目1036: [ZJOI2008]树的统计Count(Link Cut Tree,改动点权求两个最大值和最大值)

    1036: [ZJOI2008]树的统计Count Time Limit: 10 Sec  Memory Limit: 162 MB Submit: 8421  Solved: 3439 [Submi ...

  2. SQL server 数据存储过程

    创建视图

  3. 关于MP4视频拖动的原理与分析(一)

    本来想说说关于mp4和一些常见视频文件格式方面的历史. 如今想想没啥必要.毕竟本文是在讲关于mp4点播拖动方面的技术细节. 绪论,前言神马的显得有点多余. 说起MP4.不得不提"Digita ...

  4. Codeforces Round #422 (Div. 2) C. Hacker, pack your bags! 排序,贪心

    C. Hacker, pack your bags!     It's well known that the best way to distract from something is to do ...

  5. java获取class的几种方式

    以获取Hello.class为例 public class Hello { public static void main(String[] args) { // TODO Auto-generate ...

  6. 4.改变eclipse选中文字颜色

    window-preferences-general-editors-text editors-annotations-occurrences 和 window-preferences-general ...

  7. Serializable 序列化 The byte stream created is platform independent. So, the object serialized on one platform can be deserialized on a different platform.

    Java 序列化接口Serializable详解 - 火星猿类 - 博客园 http://www.cnblogs.com/tomtiantao/p/6866083.html 深入理解JAVA序列化 - ...

  8. Kills all phantomjs instances, disregard of their origin python关闭进程

    Python/Linux quit() does not terminate PhantomJS process · Issue #767 · SeleniumHQ/selenium https:// ...

  9. 在centos7下手工安装和配置Nginx

    一.什么是Nginx Nginx("enginex")是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP代理服务器,在高连接并发的情况下Nginx是Apa ...

  10. spring boot 打印sql

    配置: logging.level.gov.chinatax.ctims.dao.mapper=DEBUG or logging: level: gov.chinatax.ctims.dao.mapp ...