QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#572814 | #9320. Find the Easiest Problem | feifange | WA | 15ms | 4404kb | C++14 | 1015b | 2024-09-18 16:29:05 | 2024-09-18 16:29:05 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef struct CASE{
string tid;
char pid;
string result;
};
const int MAX = 10001;
int t,n;
CASE cs[MAX];
int zm[26];
char maxzm(int zm[26]){
int max = 0;
int size = 0;
for(int i = 0;i < 26;i++){
if(max <= zm[i]){
if(max != zm[i]){
max = zm[i];
size = i;
}
}
}
size += 65;
return (char)size;
}
int main(){
cin >> t;
for(int i = 0;i < t;i++){
cin >> n;
for(int j = 0;j < n;j++){
cin >> cs[j].tid >> cs[j].pid >> cs[j].result;
if(cs[j].result == "rejected"){
j--;
n--;
continue;
}
int size = cs[j].pid - 65;
int flag = 0;
if(cs[j].result == "accepted"){
for(int k = 0;k < j;k++){
if(cs[j].tid == cs[k].tid && cs[j].pid == cs[k].pid && cs[j].result == cs[k].result)
flag = 1;
break;
}
if(flag == 1){
j--;
n--;
continue;
}
zm[size]++;
}
}
cout << maxzm(zm) << endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 4352kb
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: 15ms
memory: 4404kb
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 H H H Z Z Z Z Z Z Z Z Z H Z Z Z H Z Z Z Z Z H 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 I H H H H H H H H H H O 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'