Run ID:123393
提交时间: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; }