QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#578190 | #9320. Find the Easiest Problem | fy | WA | 8ms | 3804kb | C++14 | 677b | 2024-09-20 17:14:19 | 2024-09-20 17:14:22 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
set<string> S[26];
int cnt[26];
void solve()
{
int n;cin>>n;
while(n --)
{
string a, b, c;
cin>>a>>b>>c;
if(c[0] == 'r')continue;
if(!S[b[0] - 'A'].count(a))cnt[b[0] - 'A'] ++;
S[b[0] - 'A'].insert(a);
}
int id, mx = 0;
for(int i = 0; i < 26; i ++)
{
if(cnt[i] > mx)
{
mx = cnt[i];
id = i;
}
}
char ans = 'A' + id;
cout<<ans<<endl;
}
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int t;cin>>t;
while(t --)
solve();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3804kb
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: 8ms
memory: 3572kb
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 P H H H Z H H H H H H H H H J F F D D D D D 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 2nd lines differ - expected: 'E', found: 'P'