浙江省省赛K题

      话说这道题应该是最水的一道题了吧,完全就是道签名题啊。还是浙江省仁义啊,让每个队都能做出来题,不像我们省,我擦,很多队都是0题啊。。。。。这道题水的够艺术。。。只要一直输出女生赢就可以了。我擦,完全是考英语的嘛。。题目:

Yet Another Story of Rock-paper-scissors

Time Limit: 2 Seconds       Memory Limit: 65536 KB

Akihisa and Hideyoshi were lovers. They were sentenced to death by the FFF Inquisition. Ryou, the leader of the FFF Inquisition, promised that the winner of Rock-paper-scissors would be immune from the punishment. Being lovers, Akihisa and Hideyoshi decided to die together with their fists clenched, which indicated rocks in the game. However, at the last moment, Akihisa chose paper and Hideyoshi chose scissors. As a result, Akihisa was punished by the FFF Inquisition and Hideyoshi survived alone.

When a boy named b and a girl named g are being punished by the FFF Inquisition, they will play Rock-paper-scissors and the winner will survive. If there is a tie, then neither of they will survive. At first, they promise to choose the same gesture x. But actually, the boy wants to win and the girl wants to lose. Of course, neither of them knows that the other one may change his/her gesture. At last, who will survive?

Input

There are multiple test cases. The first line of input is an integer T ≈ 1000 indicating the number of test cases.

Each test case contains three strings -- b g x. All strings consist of letters and their lengths never exceed 20. The gesture x is always one of "rock""paper" and "scissors".

Output

If there is a tie, output "Nobody will survive". Otherwise, output "y will survive" where y is the name of the winner.

Sample Input
1
Akihisa Hideyoshi rock
Sample Output
Hideyoshi will survive
ac代码:

#include <iostream>
#include <string>
#include <cstdio>
#include <map>
using namespace std;
int main(){
	//freopen("1.txt","r",stdin);
	int numcase;
	string boyname,girlname,op;
	scanf("%d",&numcase);
	while(numcase--){
	  cin>>boyname>>girlname>>op;
	  if(op=="rock")
		  cout<<girlname<<" "<<"will survive"<<endl;
	  else if(op=="paper")
		  cout<<girlname<<" "<<"will survive"<<endl;
	  else 
		  cout<<girlname<<" "<<"will survive"<<endl;
	}
	return 0;
}


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值