QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576679 | #9320. Find the Easiest Problem | kramQAQ | WA | 5ms | 3636kb | C++14 | 566b | 2024-09-19 21:33:10 | 2024-09-19 21:33:10 |
Judging History
answer
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
void solve()
{
int n;
cin >> n;
int ans = 0;
string s1,s2;
char x;
set<char> st[27];
while(n--){
cin >> s1;
cin >> x;
cin >> s2;
if (s2 == "accepted") st[x-'A'].insert(x);
}
for (int i = 0; i <= 'Z'-'A'; ++i){
if (st[i].size() > st[ans].size()) ans = i;
}
cout << char('A'+ans) << endl;
}
signed main()
{
ios::sync_with_stdio(0);
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: 5ms
memory: 3576kb
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 C A A A B A A A A D A F B A C A A A A A A A A A A A B A A A A B B B G B A A A C D A C D A A A A C J A A A A A A B B A A A A A B A C A A G C A E A A A E A B B A B A B A A F B A C C C C A A F A A A A B A B A A A A A A B B A B B A A A A B B A A A B A A B A G B A A G B A A A A B A A A B A A F B A B H ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'A'