QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567876 | #9320. Find the Easiest Problem | security | WA | 2ms | 3568kb | C++14 | 516b | 2024-09-16 14:26:03 | 2024-09-16 14:26:03 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
map<char,int>m;
void solve(){
int n; cin>>n;
int maxx = -1;
while(n--){
string a,b; char c; cin>>a>>c>>b;
if(b=="accepted"){
m[c]++;
}
}
for(char i='A';i<='Z';i++){
maxx = max(maxx,m[i]);
}
for(char i='A';i<='Z';i++){
if(maxx == m[i]){
cout<<i<<endl;
return ;
}
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T; cin>>T;
while(T--){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3560kb
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: 2ms
memory: 3568kb
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:
Z P Z Z Z Z Z H H H J J H J J J J J J J J J J J J J J J J J J J J Y Y Y Z Z S S H S S S S Z H H Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z O O O O O O O O O O O O O O O O O O O O O O O O H H O J O J O O O I H H H H H H H H H H H H O O O O O O O O I I I I I I I I I I I I I I I I I I I I I I I I I I ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'P'