Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133378 田祥江 19老李吃水果 C++ Compile Error 0 MS 0 KB 283 2025-10-18 16:33:55

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int qiu[8]; int main(){ int k,n; cin>>k; while(k--){ cin>>n; memset(a,0,sizeof(a)); for(int j=1;j<=10000;j++){ if(a[j]>max)max=a[j]; } if(max>n/2+1) cout<<"N"<<endl; else cout<<"Y"<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:10: error: 'a' was not declared in this scope
   memset(a,0,sizeof(a));
          ^
Main.cc:13:14: error: invalid operands of types '' and 'int' to binary 'operator>'
   if(max>n/2+1) cout<<"N"<