Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149405 李亭绪 19老李吃水果 C++ Compile Error 0 MS 0 KB 621 2026-03-11 20:09:14

Tests(0/0):


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 k,n,t,x,a[1001]; cin>>k; for(int i=1;i<=k;i++) { cin>>n; for(int j=1;i<=n;j++) a[j]=0; t=0; for(int j=1;j<=n;j++){ if(a[j>t]) t=a[j]; } if(t>(n+1)/2) cout<<"N"; else cout<<"Y"; cout<<endl; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:15: warning: unused variable 'x' [-Wunused-variable]
     int k,n,t,x,a[1001];
               ^
Main.cc:24:5: error: expected '}' at end of input
     }
     ^