foo.cc:1:24: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++.h>;
| ^
foo.cc:4:7: error: 'i' was not declared in this scope
4 | int a[i];
| ^
foo.cc: In function 'int main()':
foo.cc:19:30: error: 'a' was not declared in this scope
19 | cin>>a[i];
| ^
foo.cc:22:21: error: redeclaration of 'int flag'
22 | int flag=1;
| ^~~~
foo.cc:14:21: note: 'int flag' previously declared here
14 | int flag=1;
| ^~~~
foo.cc:25:30: error: 'a' was not declared in this scope
25 | if(b[a[i]]>=2)
| ^
foo.cc:28:37: error: invalid types 'int[int]' for array subscript
28 | if(k[i]==0) k[i]=1;
| ^
foo.cc:28:46: error: invalid types 'int[int]' for array subscript
28 | if(k[i]==0) k[i]=1;
| ^
foo.cc:40:29: error: invalid types 'int[int]' for array subscript
40 | if(k[i]==1)
| ^
foo.cc:42:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
42 | ans+=a[i];
| ^~~
| abs
foo.cc:42:38: error: 'a' was not declared in this scope
42 | ans+=a[i];
| ^
foo.cc:46:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
46 | cout<<ans<<endl;
| ^~~
| abs
foo.cc:51:2: error: expected '}' at end of input
51 | }
| ^
foo.cc:8:1: note: to match this '{'
8 | {
| ^