题目链接

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 【水】的更多相关文章

  1. 2017浙江省赛 A - Cooking Competition ZOJ - 3958

    地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3958 题目: "Miss Kobayashi's Drag ...

  2. ZOJ 2723 Semi-Prime ||ZOJ 2060 Fibonacci Again 水水水!

    两题水题: 1.如果一个数能被分解为两个素数的乘积,则称为Semi-Prime,给你一个数,让你判断是不是Semi-Prime数. 2.定义F(0) = 7, F(1) = 11, F(n) = F( ...

  3. CodeForces - 1040B Shashlik Cooking(水题)

    题目: B. Shashlik Cooking time limit per test 1 second memory limit per test 512 megabytes input stand ...

  4. ZOJ 3827 Information Entropy 水

    水 Information Entropy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Informati ...

  5. ZOJ 3819 Average Score 水

    水 Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar Univer ...

  6. ZOJ Special AC String 水

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3702 题目大意: 对于给定的一个字符串,满足如下要求输出AC,否则WA(好吧我 ...

  7. ZOJ 3168 Sort ZOJ7 水

    再水一发,舍友肿么还在睡T T. ---------------------------------舍友还在睡觉的分割线--------------------------------- http:/ ...

  8. ZOJ 2514 Generate Passwords 水

    啦啦啦,水一发准备去复习功课~ ------------------------------------------水一发的分割线----------------------------------- ...

  9. ZOJ 3827 Information Entropy 水题

    Information Entropy Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/sh ...

随机推荐

  1. 怎样正确写网站title、keywords、description比较标准。

    一.title title,也就是标题,是在浏览器上面显示出来的,方便用户了解这个页面的内容;特别是搜索引擎判断你网页内容的主要根据.搜索引擎就很大部分是依靠网站title来判断你网站是关于什么内容的 ...

  2. std::copy ( myvector.begin(), myvector.end(), out_it )

    在实际生产环境中,不能进行调试,所以程序通常需要编译一个DEBUG版本来辅助我们找出问题所在,编译这样的DEBUG版本最常用的手段就是在关键处输出我们关心一些变量的值到屏幕. 如果输出的简单的变量值, ...

  3. Hibernate使用注意事项

    映射的POJO类型中如果有基本类型最好都是用包装类来代替: 注意关联关系的正确设置,一对一(主键方式.外键外键方式),一对多和多对多的配置,单向.双向的配置: 更新核心配置文件的mapping:如果是 ...

  4. TPM概述

    TPM(Trusted Platform Module)安全芯片,是指符合TPM(可信赖平台模块)标准的安全芯片.标准由TCG(可信赖计算组织,Trusted Computing Group)提出,目 ...

  5. LeetCode207. Course Schedule

    Description There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses m ...

  6. java 服务接口API限流 Rate Limit

    一.场景描述 很多做服务接口的人或多或少的遇到这样的场景,由于业务应用系统的负载能力有限,为了防止非预期的请求对系统压力过大而拖垮业务应用系统. 也就是面对大流量时,如何进行流量控制? 服务接口的流量 ...

  7. PHP中插件机制的一种实现方案

    这篇文章的出发点是我对插件机制的理解,及其在PHP中的实现.此方案仅是插件机制在PHP中的实现方案之一,写下来和大家分享,欢迎大家一起讨论. 插件,亦即Plug-in,是指一类特定的功能模块(通常由第 ...

  8. [浪风推荐]php的memcache应用入门教程

    所需环境: php 5.3.3 apache 2.2.7 mysql 5.5.8 解压Memcached_1.2.5文档,cmd下执行memcached.exe -d -install 将php5.3 ...

  9. jsp中怎么隐藏from表 和一些按钮?

    给你提供两种方法:1.style.display="none"2.添加margen-left属性,值赋为负数,页面上有,但是不会显示

  10. 008android初级篇之jni中数组的传递

    008android初级篇之jni中数组的传递 jni中在native中数据类型的实际类型 jchar 占两个字节,跟native c中的char(占一个字节)是两个数据类型 jbyte, unsig ...