QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#576831 | #9320. Find the Easiest Problem | freesia1011 | WA | 20ms | 3752kb | C++20 | 507b | 2024-09-19 22:48:01 | 2024-09-19 22:48:02 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n;
set<string>s[30];
int main(){
string team,jieg;
char id;
int t;cin>>t;
while(t--){
cin>>n;
while(n--){
cin>>team>>id>>jieg;
if(jieg=="accepted")s[id-'A'].insert(team);
}
int max=0;
for(int i=1;i<'Z'-'A';i++){
if(s[max].size()<s[i].size())max=i;
}
id=max+'A';
cout<<id<<"\n";
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3532kb
input:
2 5 teamA A accepted teamB B rejected teamC A accepted teamB B accepted teamD C accepted 4 teamA A rejected teamB A accepted teamC B accepted teamC B accepted
output:
A A
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 20ms
memory: 3752kb
input:
1000 44 WaiooyIXa O accepted WaiooyIXa P accepted ZYYsNWag P accepted DPIawQg D rejected IzPdjnM Z rejected Ra D rejected kwQyGxLo I rejected DPIawQg L accepted kwQyGxLo I accepted mmWxDuADCB D rejected PXwVAOgwiz P rejected ZYYsNWag U accepted IzPdjnM Z accepted TgBNO P rejected kwQyGxLo J accepted...
output:
C P P H H H G H H H H H H H H H J F F D D D D D A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'C'