Problem potatotree
User limmingyao21
Submission Time 2023-12-24 21:56:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatotree.cpp:3:13: error: expected initializer before ‘ans’
3 | int n, q, x ans [500005];
| ^~~
potatotree.cpp: In function ‘int main()’:
potatotree.cpp:9:16: error: ‘x’ was not declared in this scope
9 | cin >> x;
| ^
potatotree.cpp:11:9: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
11 | ans[i] = s.size();
| ^~~
| abs
potatotree.cpp:15:16: error: ‘x’ was not declared in this scope
15 | cin >> x;
| ^
potatotree.cpp:16:17: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
16 | cout << ans[x - 1] << " ";
| ^~~
| abs