K. Yet Another Story of Rock-paper-scissors
2017-04-20 22:09
316 查看
K. Yet Another Story of Rock-paper-scissors
Time Limit: 2000msMemory Limit: 65536KB
64-bit integer IO format: %lld
Java class name: Main
Submit Status Font PID:
18517
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
水体,考验English 理解力,不能马上a,结合输入和案例应该就能猜对,套路题
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<string> #include<algorithm> #include<stack> #include<queue> #include<cctype> using namespace std; int main() { string a, b, s; int t; while (cin>>t) { while (t--) { cin >> a >> b >> s; cout << b << " will survive\n"; } } return 0; }
相关文章推荐
- [ACM_水题] Yet Another Story of Rock-paper-scissors [超水 剪刀石头布]
- 省赛热身赛之——Yet Another Story of Rock-paper-scissors
- zoj 3610 Yet Another Story of Rock-paper-scissors 忽悠。。
- Yet Another Story of Rock-paper-scissors
- zjuoj 3610 Yet Another Story of Rock-paper-scissors
- 2014ACM集训13级PK赛3-Yet Another Story of Rock-paper-scissors
- Yet Another Story of Rock-paper-scissors(水题)
- prepare for the provincial time --9.1-- Yet Another Story of Rock-paper-scissors
- K - Yet Another Story of Rock-paper-scissors
- ZOJ3610-Yet Another Story of Rock-paper-scissors
- ZOJ 3610 Yet Another Story of Rock-paper-scissors
- 省赛热身赛之——Yet Another Story of Rock-paper-scissors
- zoj 3610 Yet Another Story of Rock-paper-scissors
- ZOJ 3610 Yet Another Story of Rock-paper-scissors
- 省赛热身赛之――Yet Another Story of Rock-paper-scissors
- ZOJ 3610 Yet Another Story of Rock-paper-scissors
- The 9th Zhejiang Provincial Collegiate Programming Contest->Problem :K-Yet Another Story of Rock-pap
- The 9th Zhejiang Provincial Collegiate Programming Contest->Problem :K-Yet Another Story of Rock-pap
- The 9th Zhejiang Provincial Collegiate Programming Contest->Problem :K-Yet Another Story of Rock-pap
- poj 2339 Rock, Scissors, Paper