Problem ccs
User user123
Submission Time 2024-09-23 13:54:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ccs.cpp: In function ‘int main()’:
ccs.cpp:9:45: error: ‘flag’ was not declared in this scope
9 | for(int i = 1; i <= n; i++) { a[i] = i; flag[i]=1; }
| ^~~~
ccs.cpp:16:18: error: ‘flag’ was not declared in this scope
16 | if (!flag[x]) for(int i = x; i <= n; i++) a[i]++;
| ^~~~
ccs.cpp:17:4: error: ‘flag’ was not declared in this scope
17 | flag[x]=1;
| ^~~~
ccs.cpp:22:17: error: ‘flag’ was not declared in this scope
22 | if (flag[x]) for(int i = x; i <= n; i++) a[i]--;
| ^~~~
ccs.cpp:23:4: error: ‘flag’ was not declared in this scope
23 | flag[x]=0;
| ^~~~