Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122444 江梵睿 19老李吃水果 C++ Wrong Answer 1 MS 316 KB 848 2025-06-20 19:07:34

Tests(0/5):


Code:

#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 i,a[10001]={0},n,x,m=0,k; cin>>k; cin>>n; for(i=1;i<=k;i++){ for(i=1;i<=n;i++){ cin>>x; a[x]++; } for(i=1;i<=n;i++){ if(a[i]>m){ m=a[i]; } } if(n%2==0){ if(n/2<m){ cout<<"N"; } else{ cout<<"Y"; } } if(n%2!=0){ if((n+1)/2<m){ cout<<"N"; } else{ cout<<"Y"; } } } }


Run Info:

------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-----
Y