QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#565063 | #9320. Find the Easiest Problem | xyhhhhh | WA | 0ms | 3636kb | C++20 | 578b | 2024-09-15 20:05:57 | 2024-09-15 20:05:58 |
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=="accept")
{
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;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3636kb
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: 3624kb
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'