QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#360260#6783. Cooking CompetitionkdenWA 0ms3588kbC++14467b2024-03-21 16:20:432024-03-21 16:20:44

Judging History

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

  • [2024-03-21 16:20:44]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3588kb
  • [2024-03-21 16:20:43]
  • 提交

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: 0ms
memory: 3588kb

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'