QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#576257 | #9320. Find the Easiest Problem | codefighter | WA | 20ms | 3584kb | C++14 | 477b | 2024-09-19 19:39:05 | 2024-09-19 19:39:05 |
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 << endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
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: 20ms
memory: 3532kb
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 Z Z Z Z Z H H H J J H J J J J J J J J J J J J J J J J J J J J Y Y Y Z Z S S H S S S S Z H H Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z O O O O O O O O O O O O O O O O O O O O O O O O H H O J O J O O O I H H H H H H H H H H H H O O O O O O O O I I I I I I I I I I I I I I I I I I I I I I I I I I ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'P'