QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#572905 | #9320. Find the Easiest Problem | feifange | WA | 0ms | 4284kb | C++14 | 1.1kb | 2024-09-18 16:45:53 | 2024-09-18 16:45:53 |
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]){
max = zm[i];
size = i;
}
cout << zm[i] << " ";
}
cout << endl;
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;
}else{
zm[size]++;
}
}
}
cout << maxzm(zm) << endl;
for(int i = 0;i < 26;i++){
zm[i] = 0;
}
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 4284kb
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:
2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A
result:
wrong answer 1st lines differ - expected: 'A', found: '2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '