| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147126 | 王奕杰 | 19老李吃水果 | C++ | Presentation Error | 1 MS | 272 KB | 720 | 2026-02-02 20:10:59 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[101]={},n,s=0,k,x,max=0; cin>>k; for(int i=1;i<=k;i++){ cin>>n; for(int j=1;j<=100;j++) a[j]=0; for(int j=1;j<=n;j++){ cin>>x; a[x]++; } max=0; for(int j=1;j<=n;j++){ if(a[j]>max){ max=a[j]; } } if(max>n/2+1){ cout<<" "<<"N"<<endl; } else{ cout<<"Y"<<endl; } } return 0; }