QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576246 | #9320. Find the Easiest Problem | codefighter | WA | 0ms | 3748kb | C++14 | 458b | 2024-09-19 19:36:36 | 2024-09-19 19:36:36 |
Judging History
answer
#include<iostream>
using namespace std;
int p[32];
int main()
{
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
char v;
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;
}
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3748kb
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:
AA
result:
wrong answer 1st lines differ - expected: 'A', found: 'AA'