CodeForces 236 A.Boy or Girl(水~)
来源:互联网 发布:linux下新建文件命令 编辑:程序博客网 时间:2024/05/22 06:11
Description
给出一个只由小写字母组成的字符串,如果出现的字母种类为奇数则输出IGNORE HIM!,是偶数则输出CHAT WITH HER!
Input
一个只由小写字母组成的字符串,字符串串长不超过100
Output
如果出现的字母种类为奇数则输出IGNORE HIM!,是偶数则输出CHAT WITH HER!
Sample Input
xiaodao
Sample Output
IGNORE HIM!
Solution
水题
Code
#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include<queue>#include<map>#include<set>#include<ctime>using namespace std;typedef long long ll;typedef pair<int,int>P;const int INF=0x3f3f3f3f,maxn=100001;char s[maxn];int flag[33];int main(){ while(~scanf("%s",s)) { memset(flag,0,sizeof(flag)); int n=strlen(s),num=0; for(int i=0;i<n;i++)flag[s[i]-'a']=1; for(int i=0;i<26;i++)num+=flag[i]; if(num%2==0)printf("CHAT WITH HER!\n"); else printf("IGNORE HIM!\n"); } return 0;}
阅读全文
0 0
- CodeForces - 236A Boy or Girl (模拟)水
- CodeForces 236 A.Boy or Girl(水~)
- CodeForces-236A-Boy or Girl
- CodeForces-236A Boy or Girl
- Problem-236A-Codeforces-Boy or Girl
- codeforces 236A Boy or Girl
- codeforces 236A . Boy or Girl(字符串水题)
- codeforces 236A(Boy or Girl) Java
- 236A - Boy or Girl
- A. Boy or Girl
- A Boy or Girl
- cf--236A--boy or girl
- CF 236A boy or girl
- 0514 CF#236A Boy or Girl
- Codeforces刷题之路——236A Boy or Girl
- Boy or Girl
- Boy or Girl paradox
- Coderforces Boy or Girl
- CPU Cache的优化:解决伪共享问题
- C#引入命名空间using system
- 长沙理工大学第十二届ACM大赛 G.跑路ing【暴力】
- 好文章地址记录博客
- 汇编条件判断 eq neq
- CodeForces 236 A.Boy or Girl(水~)
- 正确做事与做正确的事
- 远端连接服务器无法绘图的bug怎么解决
- OpenCV2编程手册笔记之 2.8定义感兴趣区域(ROI)
- JavaScript 运行机制详解:Event Loop
- LeetCode· 39. Combination Sum
- new jazz music club could be a tremendously profitable enterprise
- matlab2c使用c++实现matlab函数系列教程- poly函数
- 算法详解【冒泡排序】