题目链接

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. spring boot中 使用http请求

    因为项目需求,需要两个系统之间进行通信,经过一番调研,决定使用http请求. 服务端没有什么好说的,本来就是使用web 页面进行访问的,所以spring boot启动后,controller层的接口就 ...

  2. html 标签 图片

    <img src="e:/image/a.png"/> 在html中,图片是一个字符. <img src=" e:/image/a.png" ...

  3. PLSQL配置数据库的方式

    1.直接连接的方式   2.修改客户端D:\app\Administrator\product\11.2.0\client_1\network\admin\tnsnames.ora文件的方式. ora ...

  4. HUAWEI HiAI常见FAQ小贴士

    8月7日,HUAWEI HiAI系统架构师在CSDN平台为广大开发者进行了以“APP进阶实战:最快10分钟接入HUAWEI HiAI”主题的直播,迎来600多名开发者在线上观看. ​ 直播中,讲师详细 ...

  5. 如需在 HTML 页面中插入 JavaScript,请使用 <script> 标签。

    如需在 HTML 页面中插入 JavaScript,请使用 <script> 标签. <script> 和 </script> 会告诉 JavaScript 在何处 ...

  6. Shell脚本之监视指定进程的执行状态

    在之前的博客中,以前写了自己主动化測试程序的实现方法,如今开发人员须要知道被測试的进程(在此指执行在LINUX上的主进程的)在异常退出之前的进程的执行状态,比如内存的使用率.CPU的使用率等. 现用s ...

  7. 巧妙使用JQuery Clone 添加多行数据,并更新到数据库的实现代码

    web前端代码: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="BatchAd ...

  8. 转载:Network In Network学习笔记

    转载原文1:http://blog.csdn.net/hjimce/article/details/50458190 转载原文2:http://blog.csdn.net/mounty_fsc/art ...

  9. 使用 Composer 的时候提示输入Token (hidden):

    出现了Could not fetch https://api.github.com/ ...please create a GitHub OAuth token to go over the API ...

  10. Python踩坑:类与类对象类型参数传递与使用

    前言 对初学者来说,Python确实简单好用,毕竟动态类型语言,不用定义就可以拿来用,类型之间随意转换简直不要太方便,因此Python用来写写小脚本,爬虫程序什么的,没什么问题. 不过,一旦用来开发稍 ...