QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576266 | #9320. Find the Easiest Problem | codefighter | WA | 0ms | 3504kb | C++14 | 511b | 2024-09-19 19:42:35 | 2024-09-19 19:42:35 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int p[32];
int main()
{
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
char v;
memset(p, 0, sizeof(p));
while(n--)
{
string a;
char s;
string c;
cin >> a >> s >> c;
if(c[0] == 'a')
{
p[s-65]++;
}
int max = 0;
for(int i = 0 ; i < 32 ; i++)
{
if(p[i] > max)
{
max = p[i];
v = i + 65;
}
}
}
cout << v << endl;
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3504kb
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 B
result:
wrong answer 2nd lines differ - expected: 'A', found: 'B'