QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#360258#6783. Cooking CompetitionXiangmy#WA 1ms3548kbC++14467b2024-03-21 16:20:032024-03-21 16:20:04

Judging History

你现在查看的是最新测评结果

  • [2024-03-21 16:20:04]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3548kb
  • [2024-03-21 16:20:03]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    int sc1[10]={1,0,1,-1};
    int sc2[10]={0,1,1,-1};
    cin>>n;
    while(n--){
        int b,way,k=0,t=0;
        cin>>b;
        for(int i=1;i<=b;i++){
            cin>>way;
            k+=sc1[way-1];t+=sc2[way-1];
        }
        if(k==t){cout<<"Draw"<<endl;}
        else if(k>t){cout<<"Kobayshi"<<endl;}
        else if(k<t){cout<<"Tohru"<<endl;}
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3548kb

input:

3
3
1 2 1
2
2 4
2
3 4

output:

Kobayshi
Tohru
Draw

result:

wrong answer 1st lines differ - expected: 'Kobayashi', found: 'Kobayshi'