| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147125 | 王奕杰 | 19老李吃水果 | C++ | Wrong Answer | 0 MS | 268 KB | 663 | 2026-02-02 20:07:05 |
#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; a[101]={}; 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; }
------Input------
3 6 1 2 4 2 2 4 5 1 1 1 2 1 6 1 2 4 2 2 4
------Answer-----
Y N Y
------Your output-----
Y N N