Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124620 | 陈华仁星 | 校门外的树 | C++ | Compile Error | 0 MS | 0 KB | 389 | 2025-07-12 10:06:02 |
#include <cstdio> #include <algorithm> using namespace std; int a[10005]; int main() { int l,m,num,top; scanf("%d%d",&l,&m); for(int i=1;i<=l;) { a[i]=1; } for(int i=1;i<=m;i++) { scanf("%d%d",&num,&top); for(int j=a;j<=b;j++) { a[i]==0; } } int cnt=0; for(int i=1;i<=l;i++) { if(a[i]==1) cnt++; } printf("%d",cnt); return 0; }
Main.cc: In function 'int main()': Main.cc:16:13: error: invalid conversion from 'int*' to 'int' [-fpermissive] for(int j=a;j<=b;j++) ^ Main.cc:16:18: error: 'b' was not declared in this scope for(int j=a;j<=b;j++) ^ Main.cc:18:8: warning: statement has no effect [-Wunused-value] a[i]==0; ^ Main.cc:8:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&l,&m); ^ Main.cc:15:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&num,&top); ^