| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 133382 | 田祥江 | 19老李吃水果 | C++ | Compile Error | 0 MS | 0 KB | 338 | 2025-10-18 16:40:48 |
#include<bits/stdc++.h> using namespace std; int qiu[8]; int main(){ int k,n; cin>>k; while(k--){ cin>>n; memset(a,0,sizeof(a)); for(int i=0;i<=n;i++){ cin>>t; a[t]++; } } for(int j=1;j<=10000;j++){ if(a[j]>max)max=a[j]; } if(max>n/2+1) cout<<"N"<<endl; else cout<<"Y"<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:9:10: error: 'a' was not declared in this scope
memset(a,0,sizeof(a));
^
Main.cc:11:9: error: 't' was not declared in this scope
cin>>t;
^
Main.cc:16:7: error: 'a' was not declared in this scope
if(a[j]>max)max=a[j];
^
Main.cc:18:14: error: invalid operands of types '' and 'int' to binary 'operator>'
if(max>n/2+1) cout<<"N"<