QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#573115 | #9320. Find the Easiest Problem | feifange | Compile Error | / | / | C++14 | 1.2kb | 2024-09-18 17:24:24 | 2024-09-18 17:24:24 |
Judging History
answer
#include <bits/stdc++.h>
#define int longlong
using namespace std;
struct CASE{
string tid;
char pid;
string result;
};
const int MAX = 10010;
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;
}
if(cs[j].result == "accepted"){
if (cs[j].pid >= 'A' && cs[j].pid <= 'Z'){
int size = cs[j].pid - 65;
int flag = 0;
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;
}
详细
answer.code:2:13: error: ‘longlong’ does not name a type 2 | #define int longlong | ^~~~~~~~ answer.code:11:7: note: in expansion of macro ‘int’ 11 | const int MAX = 10010; | ^~~ answer.code:2:13: error: ‘longlong’ does not name a type 2 | #define int longlong | ^~~~~~~~ answer.code:12:1: note: in expansion of macro ‘int’ 12 | int t,n; | ^~~ answer.code:13:9: error: ‘MAX’ was not declared in this scope 13 | CASE cs[MAX]; | ^~~ answer.code:2:13: error: ‘longlong’ does not name a type 2 | #define int longlong | ^~~~~~~~ answer.code:14:1: note: in expansion of macro ‘int’ 14 | int zm[26]; | ^~~ answer.code:2:13: error: ‘longlong’ was not declared in this scope 2 | #define int longlong | ^~~~~~~~ answer.code:16:12: note: in expansion of macro ‘int’ 16 | char maxzm(int zm[26]){ | ^~~ answer.code:2:13: error: ‘longlong’ does not name a type 2 | #define int longlong | ^~~~~~~~ answer.code:31:1: note: in expansion of macro ‘int’ 31 | int main(){ | ^~~