towers.cpp: In function 'void init(int, std::vector<int>)':
towers.cpp:10:8: error: 'k' was not declared in this scope
10 | if(h[k]>h[k-1] && h[i]>h[i+1]) mx=i;
| ^
towers.cpp: In function 'int max_towers(int, int, int)':
towers.cpp:15:5: error: 'l' was not declared in this scope
15 | if(l>=mx || r<=mx) return 1;
| ^
towers.cpp:15:14: error: 'r' was not declared in this scope
15 | if(l>=mx || r<=mx) return 1;
| ^
towers.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
20 | }
| ^