ZOJ 3958 Cooking Competition 【水】
题目链接
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3958
AC代码
#include <cstdio>
#include <cstring>
#include <ctype.h>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <stack>
#include <set>
#include <numeric>
#include <sstream>
using namespace std;
typedef long long LL;
const double PI = 3.14159265358979323846264338327;
const double E = 2.718281828459;
const double eps = 1e-6;
const int MAXN = 0x3f3f3f3f;
const int MINN = 0xc0c0c0c0;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
int a = 0, b = 0;
cin >> n;
int num;
for (int i = 0; i < n; i++)
{
scanf("%d", &num);
if (num == 1)
a++;
else if (num == 2)
b++;
else if (num == 3)
a++, b++;
else if (num == 4)
a--, b--;
}
if (a > b)
cout << "Kobayashi\n";
else if (a == b)
cout << "Draw\n";
else if (a < b)
cout << "Tohru\n";
}
}
ZOJ 3958 Cooking Competition 【水】的更多相关文章
- 2017浙江省赛 A - Cooking Competition ZOJ - 3958
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3958 题目: "Miss Kobayashi's Drag ...
- ZOJ 2723 Semi-Prime ||ZOJ 2060 Fibonacci Again 水水水!
两题水题: 1.如果一个数能被分解为两个素数的乘积,则称为Semi-Prime,给你一个数,让你判断是不是Semi-Prime数. 2.定义F(0) = 7, F(1) = 11, F(n) = F( ...
- CodeForces - 1040B Shashlik Cooking(水题)
题目: B. Shashlik Cooking time limit per test 1 second memory limit per test 512 megabytes input stand ...
- ZOJ 3827 Information Entropy 水
水 Information Entropy Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Informati ...
- ZOJ 3819 Average Score 水
水 Average Score Time Limit: 2 Seconds Memory Limit: 65536 KB Bob is a freshman in Marjar Univer ...
- ZOJ Special AC String 水
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3702 题目大意: 对于给定的一个字符串,满足如下要求输出AC,否则WA(好吧我 ...
- ZOJ 3168 Sort ZOJ7 水
再水一发,舍友肿么还在睡T T. ---------------------------------舍友还在睡觉的分割线--------------------------------- http:/ ...
- ZOJ 2514 Generate Passwords 水
啦啦啦,水一发准备去复习功课~ ------------------------------------------水一发的分割线----------------------------------- ...
- ZOJ 3827 Information Entropy 水题
Information Entropy Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/sh ...
随机推荐
- Window安装Anaconda后,conda不是内部或者外部命令
今天在安装Theano的时候,需要看一下,anaconda已经安装了哪些包.使用命令如下,在控制台,cmd回车输入即可: conda list 但是,显示出错,“conda不是内部或者外部命令”,第一 ...
- jquery中Uncaught TypeError: $(...).ajaxUpload is not a function(…)错误解决方法
错误原因:该函数不是jquery的核心函数,所以需要外部引入ajaxfileupload.js文件,可能是没有引入,或者引入的js文件互相冲突 解决方法:每次进入一个函数之前打印该函数所有的js文件, ...
- C# WEB 不显示目录结构
<system.webServer> <directoryBrowse enabled="false" /> </system.webServer&g ...
- Vim使用技巧(3) -- 可视化模式技巧 【持续更新】
快捷键 Esc / Ctrl + [ / v //切换到普通模式 o //切换高亮选区的光标活动端 y //将光标选中的内容复制到寄存器中 u //将光标选中的字母全部改成小写字母 U //将光标选中 ...
- git Staging Deleted files
Use git rm foo to stage the file for deletion. (This will also delete the file from the file system, ...
- 大量数据导入导致mysql自动重启
昨天晚上第十款做数据库迁移,数据库版本:Version: '5.1.61',数据量27G左右 message报错信息如下: Mar :: VM_163_210_tlinux kernel: [, oo ...
- 使用.NET Reflector 查看Unity引擎里面的DLL文件
转载标注来源哦! 原地址在这里!在这里. 当你查看unity里面API的时候.是不是有时候追踪了一两步就碰到DLL文件走不下去了呢?非常是不爽吧. 这样的问题我也是常常碰到.这是人家商业引擎不想让你看 ...
- Working with JSON in C# & VB
Introduction Whilst JSON is a compact and easy to read cross-language storage and data exchange form ...
- 图像sift配准后融合
image rectification 图像校正 在配准时,先找到特征点,找到特征点后剔除伪匹配点. 然后针对两幅图像做几何矫正(一般通过估计出来的仿射矩阵完成). 这部完成后,图像可以匹配了,但是两 ...
- jmeter安装启动报错:Not able to find Java executable or version. Please check your Java installation
1.xp安装jmeter后启动,出现下面错误,找了很多方法试了,都没有用: 2.最后找到一个方法解决了[感谢无名大神],在环境变量PATH中添加:%SystemRoot%/system32;%Syst ...