| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123393 | 唐诗阳 | 19老李吃水果 | C++ | Compile Error | 0 MS | 0 KB | 737 | 2025-06-29 15:56:14 |
#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[10001]={0},k,n,x,b=0,num,c=0; cin>>k; for(int i=1;i<=k;i++){ cin>>n; for(int j=1;j<=n;j++){ cin>>x; a[x]++; } for(int j=1;j<=10001;j++) { if(a[i]>c){ c=a[j]; num=j; } } if(n%2==0){ if(c<=n/2){ cout<<'Y'; else{ cout<<'N;' } else{ if(c<=n/2+1){ cout<<'Y'; else{ cout<<'N;' } } } } return 0; }
Main.cc:25:20: warning: multi-character character constant [-Wmultichar]
cout<<'N;'
^
Main.cc:31:20: warning: multi-character character constant [-Wmultichar]
cout<<'N;'
^
Main.cc: In function 'int main()':
Main.cc:24:10: error: expected '}' before 'else'
else{
^
Main.cc:26:10: error: expected ';' before '}' token
}
^
Main.cc:27:6: error: expected '}' before 'else'
else{
^
Main.cc:30:10: error: expected '}' before 'else'
else{
^
Main.cc:32:6: error: expected ';' before '}' token
}
^
Main.cc:7:28: warning: unused variable 'b' [-Wunused-variable]
int a[10001]={0},k,n,x,b=0,num,c=0;
^
Main.cc: At global scope:
Main.cc:36:5: error: expected unqualified-id before 'return'
return 0;
^
Main.cc:37:1: error: expected declaration before '}' token
}
^