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

目录

A. Magic Mirror(签到题) 

 I. Save the Room(签到题)


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≤T≤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;
int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        string s;
        cin>>s;
        int len=s.length();
        for(int i=0;i<len;i++)
            	s[i]=tolower(s[i]);
        if(s=="jessie")printf("Good guy!\n");
        else printf("Dare you say that again?\n");
    }
    return 0;
}

 I. Save the Room(签到题)

Bob is a sorcerer. He lives in a cuboid room which has a length of AA, a width of BB and a height of CC, so we represent it as AA * BB * CC. One day, he finds that his room is filled with unknown dark energy. Bob wants to neutralize all the dark energy in his room with his light magic. He can summon a 11 * 11 * 22 cuboid at a time to neutralize dark energy. But the cuboid must be totally in dark energy to take effect. Can you foresee whether Bob can save his room or not?

Input

Input has TT test cases. T≤100T≤100

For each line, there are three integers A,B,CA,B,C.

1≤A,B,C≤1001≤A,B,C≤100

Output

For each test case, if Bob can save his room, print"Yes", otherwise print"No".

样例输入 复制

1 1 2
1 1 4
1 1 1

样例输出 复制

Yes
Yes
No 

作为队伍里的翻译官...我看完题目第一反应是只要高能除余2就行了 ,然后让队友敲,结果wa了一次...其实只要总的体积能整除小方块的体积就行了,这个可以旋转着摆的,感谢队友呜呜呜

【通过代码】

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
    while(~scanf("%d%d%d",&a,&b,&c))
    {
        if((a*b*c)%2==0)
            	printf("Yes\n");
    	else printf("No\n");
    }
    return 0;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值