elephants.cpp:29:11: error: array bound is not an integer constant before ']' token
vi v[K * K];
^
elephants.cpp:31:12: error: array bound is not an integer constant before ']' token
vi dp[K * K];
^
elephants.cpp: In function 'void build_block(int)':
elephants.cpp:37:11: error: 'v' was not declared in this scope
int sz = v[w].size();
^
elephants.cpp:39:2: error: 'dp' was not declared in this scope
dp[w].resize(sz);
^~
elephants.cpp:39:2: note: suggested alternative: 'db'
dp[w].resize(sz);
^~
db
elephants.cpp: In function 'void del(int)':
elephants.cpp:54:8: error: 'v' was not declared in this scope
if (!v[i].empty() && v[i][0] <= val && val <= v[i].back()) {
^
elephants.cpp: In function 'void add(int)':
elephants.cpp:70:8: error: 'v' was not declared in this scope
if (!v[i].empty() && val <= v[i].back()) {
^
elephants.cpp:75:17: error: 'v' was not declared in this scope
for (auto it : v[pr]) {
^
elephants.cpp:82:2: error: 'v' was not declared in this scope
v[pr] = nw;
^
elephants.cpp: In function 'void build()':
elephants.cpp:90:3: error: 'v' was not declared in this scope
v[i].clear(),dp[i].clear();
^
elephants.cpp:90:16: error: 'dp' was not declared in this scope
v[i].clear(),dp[i].clear();
^~
elephants.cpp:90:16: note: suggested alternative: 'db'
v[i].clear(),dp[i].clear();
^~
db
elephants.cpp:93:3: error: 'v' was not declared in this scope
v[index / K].pb(it);
^
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:123:7: error: 'v' was not declared in this scope
if (v[i].empty())
^
elephants.cpp:125:29: error: 'v' was not declared in this scope
int low = lower_bound(all(v[i]),prev) - v[i].begin();
^
elephants.cpp:14:16: note: in definition of macro 'all'
#define all(s) s.begin(),s.end()
^
elephants.cpp:127:11: error: 'dp' was not declared in this scope
ans += dp[i][low];
^~
elephants.cpp:127:11: note: suggested alternative: 'db'
ans += dp[i][low];
^~
db