2018ACM/ICPC 焦作网络预选赛-A Magic Mirror

Posted songorz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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(1T100), 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?

题目来源

ACM-ICPC 2018 焦作赛区网络预赛

签到题:

#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==6)
		{
			for(int i=0;i<6;i++) if(s[i]>=‘A‘&&s[i]<=‘Z‘) s[i]=s[i]+32;
			if(s=="jessie") puts("Good guy!");
			else puts("Dare you say that again?");
		}
		else puts("Dare you say that again?");	
	}

	return 0;	
} 

  

以上是关于2018ACM/ICPC 焦作网络预选赛-A Magic Mirror的主要内容,如果未能解决你的问题,请参考以下文章

ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 A.Saving Tang Monk II(优先队列广搜)

ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 B Tomb Raider 二进制枚举

ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 ASaving Tang Monk II 状态搜索

ACM ICPC 2008–2009 NEERC MSC A, B, C, G, L

求助:ACM/ICPC大赛有没有实用价值?

2018焦作网络赛A