C.真真假假

链接:https://www.nowcoder.com/acm/contest/86/C

这个题真的是无敌的水,但是自己写前面的string数组的时候,里面的这些头文件要用双引号(" ")括起来,敲双引号敲到手抽筋,超级暴力的写法,还被对面的瓜皮骂了一句(嫌我操作太秀。。。)

代码:

 1 //C
2 #include<iostream>
3 #include<cstdio>
4 #include<cstring>
5 #include<cmath>
6 #include<cstdlib>
7 #include<algorithm>
8 #include<queue>
9 #include<vector>
10 #include<stack>
11 using namespace std;
12 typedef long long ll;
13 const int maxn=1e5+10;
14 const double eps=1e-7;
15 string c[100]={"algorithm", "bitset", "cctype", "cerrno", "clocale", "cmath", "complex", "cstdio", "cstdlib", "cstring", "ctime", "deque", "exception", "fstream", "functional", "limits", "list", "map", "iomanip", "ios", "iosfwd", "iostream", "istream", "ostream", "queue", "set", "sstream", "stack", "stdexcept", "streambuf", "string", "utility", "vector", "cwchar", "cwctype"};
16 int main(){
17 int t;
18 cin>>t;
19 while(t--){
20 string s;
21 cin>>s;
22 int flag=0;
23 for(int i=0;i<100;i++){
24 if(s==c[i]){
25 flag=1;
26 cout<<"Qian"<<endl;
27 break;
28 }
29 }
30 if(flag==0)cout<<"Kun"<<endl;
31 }
32 }
 
 
 
 
 

牛客网 牛客小白月赛2 C.真真假假-String遍历比较的更多相关文章

  1. 牛客网 牛客小白月赛5 I.区间 (interval)-线段树 or 差分数组?

    牛客小白月赛5 I.区间 (interval) 休闲的时候写的,但是写的心情有点挫,都是完全版线段树,我的一个队友直接就水过去了,为啥我的就超内存呢??? 试了一晚上,找出来了,多初始化了add标记数 ...

  2. 牛客网 牛客小白月赛12 B.华华教月月做数学-A^B mod P-快速幂+快速乘

    链接:https://ac.nowcoder.com/acm/contest/392/B来源:牛客网 华华教月月做数学 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其 ...

  3. 牛客网 牛客小白月赛1 J.おみやげをまらいました

    J.おみやげをまらいました   链接:https://www.nowcoder.com/acm/contest/85/J来源:牛客网     随便写写.   代码: 1 #include<ios ...

  4. 牛客网 牛客小白月赛1 I.あなたの蛙が帰っています-卡特兰数,组合数阶乘逆元快速幂

    I.あなたの蛙が帰っています   链接:https://www.nowcoder.com/acm/contest/85/I来源:牛客网     这个题有点意思,是卡特兰数,自行百度就可以.卡特兰数用处 ...

  5. 牛客网 牛客小白月赛1 H.写真がとどいています

    H.写真がとどいています   链接:https://www.nowcoder.com/acm/contest/85/H来源:牛客网     这个题数乱了,导致wa了好几次. 特别弱智,从A开始往上,就 ...

  6. 牛客网 牛客小白月赛1 F.三视图

    F.三视图   链接:https://www.nowcoder.com/acm/contest/85/F来源:牛客网     这个题自己想一下三维的,正视图和左视图中y轴为行数,x轴和z轴是列数,因为 ...

  7. 牛客网 牛客小白月赛1 E.圆与三角形-公式题

    E.圆与三角形   链接:https://www.nowcoder.com/acm/contest/85/E来源:牛客网     这个题把公式推一下, 发现就是1+sinA*r,sinA最大为1,所以 ...

  8. 牛客网 牛客小白月赛1 D.多项式乘法

    D.多项式乘法   链接:https://www.nowcoder.com/acm/contest/85/D来源:牛客网 这个题想一下就能想出来了. 代码: 1 #include<iostrea ...

  9. 牛客网 牛客小白月赛1 C.分元宵-快速幂

    C.分元宵   链接:https://www.nowcoder.com/acm/contest/85/C来源:牛客网 这个题就是快速幂,注意特判,一开始忘了特判,wa了一发. 代码: 1 #inclu ...

随机推荐

  1. 学习BootStrap3.3.4——敲完全局CSS样式

    历时7小时- -(算上晚饭)终于敲完BootStrap CSS样式部分.还是第一次这么持久的敲纯前端,连JS都没有. 正好趁这机会熟悉了Sublime,主要是各个快捷键的用法.目前用到最多的: 而且s ...

  2. 重写BaseAdapter实现ListView

    public class BaseAdapterActivity extends BaseActivity { private ListView base_adapter_listView; priv ...

  3. Storm: 遇到问题总结

    1.没有ack : kafkaspout id 重复导致每次读最新没有数据. 2.由于storm提供的读取kafka的enternal工具存在bug,导致重复读取数据,致使数据不准确.storm bu ...

  4. 查询语句为“%string_”的情况

    select * from t_user where user_name like '%Joe_%'实际查询出来的语句为: 而不像预计的前两条.

  5. Python虚拟机类机制之从class对象到instance对象(五)

    从class对象到instance对象 现在,我们来看看如何通过class对象,创建instance对象 demo1.py class A(object): name = "Python&q ...

  6. Windows Server 2012之活动目录域服务的卸载

    Windows Server 2012之活动目录域服务的卸载 2012-07-11 06:27:35 标签:Windows Server 2012 活动目录域服务 卸载 原创作品,允许转载,转载时请务 ...

  7. 【Word Ladder II】cpp

    题目: Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) ...

  8. redis命令monitor详解

    通过monitor这个命令可以查看数据库在当前做了什么操作,对于管理redis数据库有这很大的帮助 如图示,在redis客户端进行操作显示info,另一个窗口打开monitor就会显示出这个命令的操作 ...

  9. getRequestURI,getRequestURL的区别,获取各种路径的方法

    getRequestURI,getRequestURL的区别 test1.jsp======================= <a href ="test.jsp?p=fuck&qu ...

  10. activemq 简单聊天

    有兴趣加群qq:200634530