zoj 3958 Cooking Competition
来源:互联网 发布:网络布线 报价 编辑:程序博客网 时间:2024/06/06 13:12
题目链接:Cooking Competition
题目大意,给你四种操作,每种操作的双方会获得不同分数,问你最后谁获胜;
题目思路:水题,直接模拟就可以了
#include <bits/stdc++.h>using namespace std;typedef long long ll;int a[4] = {1,0,1,-1},b[4] = {0,1,1,-1};int main(){ int t; scanf("%d",&t); while(t--){ int n,x[25]; scanf("%d",&n); ll sum1 = 0,sum2 = 0; for(int i = 0;i < n;i++){ scanf("%d",&x[i]); sum1 += a[x[i]-1]; sum2 += b[x[i]-1]; } if(sum1 > sum2) puts("Kobayashi"); else if(sum1 == sum2) puts("Draw"); else puts("Tohru"); } return 0;}
0 0
- ZOJ 3958 Cooking Competition
- ZOJ 3958 Cooking Competition【】
- zoj 3958 Cooking Competition
- ZOJ 3958Cooking Competition
- ZOJ 3958 Cooking Competition 题解
- Cooking Competition
- Cooking Competition
- Cooking Competition
- ZOJ3958-Cooking Competition
- ZOJ3958 Cooking Competition
- Cooking
- cooking
- Competition
- cooking处理
- Cooking 笔记
- FOOD COOKING
- Cooking food
- 【题解】cooking
- 逆向分析一个完整的C++程序包含寄存器与参数传递详解
- 函数可变参数列表的套路
- IO流---字节输出流
- ElasticSearch系列10:分布式集群的特性
- oracle主键自增 创建多个触发器
- zoj 3958 Cooking Competition
- java创建对象的5种方式
- redis3.0.4 集群安装步骤
- poj1113/hdu1348(凸包。。。两个网站上的输入输出有点出入)
- 第四单元
- 带有注解的servlet的生命周期.
- css绝对定位
- 2017.4.26 组合数问题 思考记录
- python3 分支界限法解决作业分配问题