QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#573470 | #9320. Find the Easiest Problem | yasdf123 | RE | 0ms | 0kb | C++20 | 459b | 2024-09-18 18:55:00 | 2024-09-18 18:55:13 |
answer
#include<bits/stdc++.h>
using namespace std;
int run(){
int n;
cin>>n;
map<string,map<string,int>> s;
int an=0;
char ans='Z';
for(int i=0;i<n;i++){
string x[3];
cin>>x[0]>>x[1]>>x[2];
if(x[2]=="accepted"){
s[x[1]][x[0]]=1;
if((s[x[1]].size()>an)||((s[x[1]].size()==an)&&(x[1][0]<ans))){
an=s[x[1]].size();
ans=x[1][0];
}
}
}
cout<<ans<<"\n";
}
int main(){
int t;
cin>>t;
while(t--){
run();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Runtime Error
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