QOJ.ac
QOJ
ID | Submission ID | Problem | Hacker | Owner | Result | Submit time | Judge time |
---|---|---|---|---|---|---|---|
#871 | #576115 | #9320. Find the Easiest Problem | 3un_larryfunc | Aa | Failed. | 2024-09-21 20:34:48 | 2024-09-21 20:34:48 |
Details
Extra Test:
Invalid Input
input:
output:
result:
FAIL Unexpected white-space - token expected (stdin, line 1)
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#576115 | #9320. Find the Easiest Problem | Aa# | AC ✓ | 9ms | 5600kb | C++14 | 717b | 2024-09-19 18:31:28 | 2024-09-19 18:31:28 |
answer
#include <iostream>
#include <algorithm>
#include <unordered_map>
#define endl "\n"
using namespace std;
int cnt[26];
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int t;
cin >> t;
while(t--){
int n;
unordered_map<string,bool> S[26];
cin >> n;
for(int i=0;i<26;i++) cnt[i]=0;
while(n--){
string name;
char id;
string state;
cin >> name >> id >> state;
if(state=="accepted"){
int p=id-'A';
if(!S[p].count(name)){
cnt[p]++;
S[p][name]=true;
}
}
}
int mx=0;
for(int i=0;i<26;i++) mx=max(mx,cnt[i]);
for(int i=0;i<26;i++)
if(cnt[i]==mx){
cout << char(65+i) << endl;
break;
}
}
return 0;
}