K - Yet Another Story of Rock-paper-scissors
来源:互联网 发布:sai软件多大 编辑:程序博客网 时间:2024/06/05 04:28
Description
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 -- bgx. 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
1Akihisa Hideyoshi rock
Sample Output
Hideyoshi will survive
#include<iostream>#include<cstdio>#include<cstring>using namespace std;int main(){ int T; int i,j,k; char a[30]; char b[30]; char c[30]; scanf("%d",&T); while(T--) { scanf("%s%s%s",a,b,c); printf("%s will survive\n",b); } return 0;}
- K - Yet Another Story of Rock-paper-scissors
- K. 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
- 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
- ZOJ 3610Yet Another Story of Rock-paper-scissors
- ZOJ3610-Yet Another Story of Rock-paper-scissors
- zoj 3610 Yet Another Story of Rock-paper-scissors 忽悠。。
- prepare for the provincial time --9.1-- Yet Another Story of Rock-paper-scissors
- 省赛热身赛之——Yet Another Story of Rock-paper-scissors
- 2014ACM集训13级PK赛3-Yet Another Story of Rock-paper-scissors
- The 9th Zhejiang Provincial Collegiate Programming Contest->Problem :K-Yet Another Story of Rock-pap
- 4952. Another Rock-Paper-Scissors Problem
- Sicily 4952. Another Rock-Paper-Scissors Problem
- D - Draw Something Cheat(水)
- Json数据的序列化与反序列化的三种常用方法介绍
- 中断服务程序设计实验
- android 布局之滑动探究 scrollTo 和 scrollBy 方法使用说明
- 二叉树之二叉链表
- K - Yet Another Story of Rock-paper-scissors
- 黑马程序员11--集合
- C++风格的四种类型转换
- 1012.畅通工程
- Java 8中的Lambda表达式(基于Java 8 Tutorial)
- 计算机视觉的一些测试数据集和源码站点
- hbase 0.98.1集群安装
- tiny210(S5PV210)uboot的顶层Makefile的连接命令理解——记tiny210之uboot移植
- 渐进最优