foo.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
2 | void main()
| ^~~~
foo.c: In function 'main':
foo.c:5:5: error: unknown type name 'bool'
5 | bool trees[10001];
| ^~~~
foo.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 | void main()
foo.c:7:20: error: 'true' undeclared (first use in this function)
7 | trees[i] = true;
| ^~~~
foo.c:7:20: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c:7:20: note: each undeclared identifier is reported only once for each function it appears in
foo.c:13:24: error: 'false' undeclared (first use in this function)
13 | trees[j] = false;
| ^~~~~
foo.c:13:24: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c:16:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
16 | for(i = 0;i <= L; i++)
| ^~~
foo.c:18:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
18 | printf("%d\n", count);
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务