QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#565074 | #9320. Find the Easiest Problem | xyhhhhh | WA | 0ms | 3844kb | C++20 | 580b | 2024-09-15 20:08:54 | 2024-09-15 20:08:55 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve()
{
string name,sta;char c;
int n;
map<string,map<char,int> >mp;
int cnt[26]={};
while(n--)
{
cin>>name>>c>>sta;
if(sta=="accepted")
{
if(mp[name][c]==0)
{
cnt[c-'A']++;
mp[name][c]=1;
}
}
}
int mx=-1,ans;
for(int i=0;i<26;i++)
{
if(cnt[i]>mx)
{
mx=cnt[i];
ans=i;
}
}
cout<<(char)('A'+ans)<<"\n";
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t=1;
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: 3844kb
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: 0ms
memory: 3560kb
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:
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 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: 'A'