ZOJ 3610 Yet Another Story of Rock-paper-scissors

来源:互联网 发布:h3c网络工程师证书知乎 编辑:程序博客网 时间:2024/06/07 04:01

题目链接:http://www.icpc.moe/onlinejudge/showProblem.do?problemCode=3610

思路:随便推一下会知道肯定是第二个人赢

ac代码:

#include<stdio.h>#include<math.h>#include<string.h>#include<stack>#include<set>#include<queue>#include<vector>#include<iostream>#include<algorithm>#define MAXN 1010000#define LL long long#define ll __int64#define INF 0xfffffff#define mem(x) memset(x,0,sizeof(x))#define PI acos(-1)using namespace std;int gcd(int a,int b){return b?gcd(b,a%b):a;}LL powmod(LL a,LL b,LL MOD){LL ans=1;while(b){if(b%2)ans=ans*a%MOD;a=a*a%MOD;b/=2;}return ans;}//headchar a[1010],b[1010],c[1010];int main(){    int t;    scanf("%d",&t);    while(t--)    {        scanf("%s%s%s",a,b,c);        printf("%s will survive\n",b);    }    return 0;}
0 0
原创粉丝点击