towers.cpp: In function 'int get(int, int)':
towers.cpp:27:12: error: cannot convert 'const std::pair<int, int>' to 'int' in return
27 | return max(p[l][k], p[r - (1 << k) + 1][k]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const std::pair<int, int>
towers.cpp: In function 'void build(int, int)':
towers.cpp:10:12: error: request for member 'second' in 'get(l, r)', which is of non-class type 'int'
10 | #define ss second
| ^~~~~~
towers.cpp:32:22: note: in expansion of macro 'ss'
32 | int pos = get(l, r).ss;
| ^~
towers.cpp:36:2: error: 'pre' was not declared in this scope
36 | pre[pos] = 1;
| ^~~
towers.cpp: In function 'void init(int, std::vector<int>)':
towers.cpp:57:3: error: 'pre' was not declared in this scope
57 | pre[i] += pre[i - 1];
| ^~~
towers.cpp: In function 'int max_towers(int, int, int)':
towers.cpp:65:24: error: 'pre' was not declared in this scope
65 | int ans = r - l + 1 - pre[r] + pre[l - 1];
| ^~~