| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72224 | 冯诚阳 | 19老李吃水果 | C++ | Wrong Answer | 1 MS | 312 KB | 444 | 2024-05-04 14:30:32 |
# include<iostream> # include<iomanip> using namespace std; int main(){ int k,n,a[10001]={0},max=0,x; cin>>k; for(int i=1;i<=k;i++){ cin>>n; for(int j=1;j<=10000;j++) a[j]=0; max=0; for(int j=1;j<=n;j++){ cin>>x; a[x]++; } for(int j=1;j<=n;j++){ if(a[j]>max) max=a[j]; } if(max>n/2) cout<<"N"; else cout<<"Y"; } return 0; }
------Input------
5 6 1 2 4 2 2 4 5 1 1 1 2 1 5 1 1 1 2 1 5 1 1 1 2 1 5 1 1 1 2 1
------Answer-----
Y N N N N
------Your output-----
YNNNN