2018ACM/ICPC 焦作网络预选赛-A Magic Mirror
Jessie has a magic mirror.
Every morning she will ask the mirror: 'Mirror mirror tell me, who is the most beautiful girl in the world?' If the mirror says her name, she will praise the mirror: 'Good guy!', but if the mirror says the name of another person, she will assail the mirror: 'Dare you say that again?'
Today Jessie asks the mirror the same question above, and you are given a series of mirror's answers. For each answer, please output Jessie's response. You can assume that the uppercase or lowercase letters appearing anywhere in the name will have no influence on the answer. For example, 'Jessie' and 'jessie' represent the same person.
Input
The first line contains an integer T(1 \le T \le 100)T(1≤T≤100), which is the number of test cases.
Each test case contains one line with a single-word name, which contains only English letters. The length of each name is no more than 1515.
Output
For each test case, output one line containing the answer.
样例输入复制
2
Jessie
Justin
样例输出复制
Good guy!
Dare you say that again?
题目来源
签到题:
#include<bits/stdc++.h>
using namespace std;
#define mem(a,b) memset(a,b,sizeof a)
#define eps 1e-8
#define PI acos(-1.0)
typedef long long LL;
typedef pair<int,int> P;
const int INF=0x3f3f3f3f;
int T;
string s; int main()
{
scanf("%d",&T);
while(T--)//Jessie
{
cin>>s;
int len=s.length();
if(len==)
{
for(int i=;i<;i++) if(s[i]>='A'&&s[i]<='Z') s[i]=s[i]+;
if(s=="jessie") puts("Good guy!");
else puts("Dare you say that again?");
}
else puts("Dare you say that again?");
} return ;
}
2018ACM/ICPC 焦作网络预选赛-A Magic Mirror的更多相关文章
- ACM-ICPC 2018 焦作赛区网络预赛 A Magic Mirror(签到)
https://nanti.jisuanke.com/t/31710 题意 若输入的是Jessie或jessie,输出Good guy!,否则输出Dare you say that again? 分析 ...
- 2018 ICPC 焦作网络赛 E.Jiu Yuan Wants to Eat
题意:四个操作,区间加,区间每个数乘,区间的数变成 2^64-1-x,求区间和. 题解:2^64-1-x=(2^64-1)-x 因为模数为2^64,-x%2^64=-1*x%2^64 由负数取模的性质 ...
- 【2018 ICPC焦作网络赛 K】Transport Ship(多重背包二进制优化)
There are N different kinds of transport ships on the port. The ith kind of ship can carry the weigh ...
- 【2018 ICPC焦作网络赛 G】Give Candies(费马小定理+快速幂取模)
There are N children in kindergarten. Miss Li bought them N candies. To make the process more intere ...
- 2019 ICPC南京网络预选赛 I Washing clothes 李超线段树
题意:有n个人,每个人有一件衣服需要洗,可以自己手洗花费t时间,也可以用洗衣机洗,但是洗衣机只有一台,即每个时刻最多只能有·一个人用洗衣机洗衣服.现在给你每个人最早可以开始洗衣服的时间,问当洗衣机的洗 ...
- 【2018ACM/ICPC网络赛】焦作赛区
A Magic Mirror 题目链接:https://nanti.jisuanke.com/t/31710 题意:输入字符串,如果是“Jessy”就输出“Good Guy!",否则输出“D ...
- 2019 ICPC 南昌网络赛
2019 ICPC 南昌网络赛 比赛时间:2019.9.8 比赛链接:The 2019 Asia Nanchang First Round Online Programming Contest 总结 ...
- 树形DP CCPC网络赛 HDU5834 Magic boy Bi Luo with his excited tree
// 树形DP CCPC网络赛 HDU5834 Magic boy Bi Luo with his excited tree // 题意:n个点的树,每个节点有权值为正,只能用一次,每条边有负权,可以 ...
- HDU 5833 (2016大学生网络预选赛) Zhu and 772002(高斯消元求齐次方程的秩)
网络预选赛的题目……比赛的时候没有做上,确实是没啥思路,只知道肯定是整数分解,然后乘起来素数的幂肯定是偶数,然后就不知道该怎么办了… 最后题目要求输出方案数,首先根据题目应该能写出如下齐次方程(从别人 ...
随机推荐
- cmake 编译安装mysql5.5.32
1.安装cmake 上传tar包 rz cmake-2.8.8.tar.gz 解压tar包,并进入解压后的文件夹 tar xf cmake-2.8.8.tar.gz cd cmake-2.8.8 编译 ...
- tornado的使用-上传图片
tornado的使用-上传图片
- [增强for循环] 格式
比如:
- 020.掌握Pod-Pod基础使用
一 Pod定义详解 1.1 完整Pod定义文件 apiVersion: v1 #必选,版本号,例如v1,版本号必须可以用 kubectl api-versions 查询到 kind: Pod #必选, ...
- Django 通过 ORM 实现表的CRUD
Django 通过 ORM 实现表的CRUD 单表的创建 修改 setting.py 文件 DATABASES = { 'default': { 'ENGINE': 'django.db.backen ...
- nyoj 268-荷兰国旗问题 (count)
268-荷兰国旗问题 内存限制:64MB 时间限制:3000ms 特判: No 通过数:15 提交数:20 难度:1 题目描述: 荷兰国旗有三横条块构成,自上到下的三条块颜色依次为红.白.蓝.现有若干 ...
- Apache中AllowOverride的详细配置使用
我们通常利用Apache的rewrite模块对URL进行重写,rewrite规则会写在 .htaccess 文件里.但要使 apache 能够正常的读取.htaccess 文件的内容,就必须对.hta ...
- 领扣(LeetCode)两句话中的不常见单词 个人题解
给定两个句子 A 和 B . (句子是一串由空格分隔的单词.每个单词仅由小写字母组成.) 如果一个单词在其中一个句子中只出现一次,在另一个句子中却没有出现,那么这个单词就是不常见的. 返回所有不常用单 ...
- bat脚本知识总结
1常用基本命令 1.1 @ 它的作用是让执行窗口中不显示它后面这一行的命令本身 1.2 echo 它其实是一个开关命令,就是说它只有两种状态:打开和关闭.于是就有了echo on 和echo off两 ...
- tornado install
pip install tornado Linux 安装时注意库的安装路径和执行时寻找路径是否一样 Windows 安装时注意user是否有权限 解决办法: