ZOJ 3958: Cooking Competition
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ZOJ 3958: Cooking Competition相关的知识,希望对你有一定的参考价值。
///@author Sycamore, ZJNU ///@date 4/22/2017 #include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <string> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <set> #include <list> #include <stack> #include <queue> #include <map> #include <algorithm> #include <cctype> #include<fstream> //#define cin fin //#define cout fout //ifstream fin("in.txt"); //ofstream fout("out.txt"); using namespace std; typedef vector<int> VI; typedef pair<int, int> PII; int main() { ios::sync_with_stdio(false); int T; cin >> T; while (T--) { int k = 0, t = 0; int n; cin >> n; while (n--) { int f; cin >> f; if (f == 1)k++; else if (f == 2)t++; } if (k > t)cout << "Kobayashi"; else if (k < t)cout << "Tohru"; else cout << "Draw"; cout << endl; } return 0; }
以上是关于ZOJ 3958: Cooking Competition的主要内容,如果未能解决你的问题,请参考以下文章