foo.cc: In function 'int main()':
foo.cc:6:17: error: conflicting declaration 'int a'
6 | int a[N+1],j=N,a=1,b=0;
| ^
foo.cc:6:6: note: previous declaration as 'int a [(N + 1)]'
6 | int a[N+1],j=N,a=1,b=0;
| ^
foo.cc:7:20: error: 'k' was not declared in this scope
7 | scanf("%d %d",&N,&k);
| ^
foo.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | while(a<K)
| ^
foo.cc:16:5: error: lvalue required as increment operand
16 | a++;
| ^~
foo.cc:21:5: error: incompatible types in assignment of 'int' to 'int [(N + 1)]'
21 | a=1;
| ^
[Hydro](https://hydro.ac)提供评测服务