Main.cpp:5:1: error: expected initializer before 'long'
5 | long long ans = 0;
| ^~~~
Main.cpp: In function 'int get(int)':
Main.cpp:12:24: error: 'tree' was not declared in this scope; did you mean 'free'?
12 | sum += tree[idx];
| ^~~~
| free
Main.cpp: In function 'void upd(int, int, int)':
Main.cpp:20:17: error: 'tree' was not declared in this scope; did you mean 'free'?
20 | tree[idx] += val;
| ^~~~
| free
Main.cpp: In function 'int main()':
Main.cpp:48:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
48 | for(int j=0; j<v[i].size(); j++) {
| ~^~~~~~~~~~~~
Main.cpp:55:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
55 | ans = get(n - k + 1) + ans;
| ^~~
| abs
Main.cpp:57:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
57 | cout << ans;
| ^~~
| abs