文章目录

  • 一、Boy or Girl
  • 总结

一、Boy or Girl

本题链接:Boy or Girl

题目

A. Boy or Girl
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
Those days, many boys use beautiful girls’ photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat with a beauty (he thought so). After that they talked very often and eventually they became a couple in the network.

But yesterday, he came to see “her” in the real world and found out “she” is actually a very strong man! Our hero is very sad and he is too tired to love again now. So he came up with a way to recognize users’ genders by their user names.

This is his method: if the number of distinct characters in one’s user name is odd, then he is a male, otherwise she is a female. You are given the string that denotes the user name, please help our hero to determine the gender of this user by his method.

Input
The first line contains a non-empty string, that contains only lowercase English letters — the user name. This string contains at most 100 letters.

Output
If it is a female by our hero’s method, print “CHAT WITH HER!” (without the quotes), otherwise, print “IGNORE HIM!” (without the quotes).

Examples

input
wjmzbmr

output
CHAT WITH HER!

input
xiaodao

output
IGNORE HIM!

input
sevenkplus

output
CHAT WITH HER!

Note
For the first example. There are 6 distinct characters in “wjmzbmr”. These characters are: “w”, “j”, “m”, “z”, “b”, “r”. So wjmzbmr is a female and you should print “CHAT WITH HER!”.

本博客给出本题截图


题意:如果输入的字符串中字符相同的个数是奇数的话就是男生,反之是女生

AC代码

#include <iostream>using namespace std;const int N = 110;char s[N];
int res; int main()
{cin >> s;for (int i = 0; s[i]; i ++ ){bool flag = true;for (int j = 0; j < i; j ++ )if (s[i] == s[j])flag = false;if (flag) res ++;}if (res % 2) puts("IGNORE HIM!");else puts("CHAT WITH HER!");return 0;
}

总结

quote 引号
forum 论坛
avatar 化身
determine 造成

水题,不解释

最新文章

  1. CSS与HTML设计模式全集(350余种)
  2. 蓝色巨人将磁带定位为数据存储的集成归档层
  3. curl命令java_让 Bug 无处藏身,Java 线上问题排查思路、常用工具
  4. 听听一个院士的故事,你也能找到自己的路。
  5. ubuntu 文件及子文件夹的权限的查看及修改
  6. 均值模糊调试遇到的问题
  7. 全新We7 CMS 2.6版火热发布
  8. 选手及评委素材信息规范处理说明
  9. [UNIX]The UNIXHATERS Handbook
  10. 华为简单静态路由配置
  11. 数据库较长数据导出到excel单元格变成科学计数法
  12. 随手写了些java题目的答案
  13. 实现多方数据安全共享,解决普惠金融信息不对称难题
  14. Vue Echarts绘制世界地图
  15. 5 打印选课学生名单 (25 分)
  16. camel发布多个服务
  17. 代谢组学数据分析及网络药理学研究技术与实践
  18. 九章云极发布YLearn因果学习开源项目;字节跳动大量招聘芯片工程师;苹果被俄法院罚款约21.6万元 | 每日大事件...
  19. php 在线选座,基于jquery实现在线选座订座之影院篇
  20. python网页信息违法吗_爬虫到底违法吗?这位爬虫工程师给出了答案

热门文章

  1. [转载] 中华典故故事(孙刚)——40 不见棺材不落泪,不到黄河不死心
  2. 验证码测试的解决方案
  3. Win8 Metro(C#)数字图像处理--4图像颜色空间描述
  4. 个人任务管理工具(TODO工具)
  5. r77-Rootkit后渗透技战术分析
  6. 用U盘或移动硬盘装 深山红叶袖珍系统Win PE启动盘
  7. jQuery 使用slideToggle()滑动显示隐藏
  8. win7网络看到部分其他计算机ip通,win7肿么查看同一个局域网内其他电脑IP?
  9. 抗渗等级p6是什么意思_砼抗渗等级S6和P6有何区别
  10. 4-思科防火墙:访问控制列表:基本ACL