Problem segmenttree
User shoryu386
Submission Time 2023-12-25 02:09:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:28:16: error: ‘n’ was not declared in this scope
28 | int q; cin >> n >> q; int arr[n];
| ^
segmenttree.cpp:29:29: error: ‘arr’ was not declared in this scope
29 | for (int x = 0;x < n;x ++) arr[x] = 0;
| ^~~
segmenttree.cpp:31:43: error: ‘arr’ was not declared in this scope
31 | SparseTable *st; st = new SparseTable(n, arr);
| ^~~
segmenttree.cpp:41:12: error: ‘query’ was not declared in this scope
41 | cout << query(x, v) << '\n';;
| ^~~~~