elephants.cpp: In function 'void recalcBlock(int, bool)':
elephants.cpp:26:9: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
26 | if (blocks[i].size() == 0) {
| ^~~~~~
| blockId
elephants.cpp:33:18: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
33 | sort(all(blocks[i]), comp);
| ^~~~~~
elephants.cpp:11:22: note: in definition of macro 'all'
11 | #define all(x) begin(x), end(x)
| ^
elephants.cpp:35:5: error: 'storeBack' was not declared in this scope
35 | storeBack[i].resize(blocks[i].size());
| ^~~~~~~~~
elephants.cpp:35:25: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
35 | storeBack[i].resize(blocks[i].size());
| ^~~~~~
| blockId
elephants.cpp: In function 'void rebuild()':
elephants.cpp:53:22: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
53 | for (auto& vec : blocks) {
| ^~~~~~
| blockId
elephants.cpp:61:9: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
61 | blocks[i/K].push_back(permVec[i]);
| ^~~~~~
| blockId
elephants.cpp: In function 'int getAns()':
elephants.cpp:72:13: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
72 | if (blocks[i].size() > 0 && next < X[blocks[i].back()]) {
| ^~~~~~
| blockId
elephants.cpp:84:20: error: 'storeBack' was not declared in this scope
84 | res += storeBack[i][high].f;
| ^~~~~~~~~
elephants.cpp: In function 'void init(int, int, int*)':
elephants.cpp:99:3: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
99 | blocks.resize(BLOCKSIZE, {});
| ^~~~~~
| blockId
elephants.cpp:100:3: error: 'storeBack' was not declared in this scope
100 | storeBack.resize(BLOCKSIZE, {});
| ^~~~~~~~~
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:111:5: error: 'blocks' was not declared in this scope; did you mean 'blockId'?
111 | blocks[blockId[i]].erase(find(all(blocks[blockId[i]]), i));
| ^~~~~~
| blockId