towers.cpp: In function 'void init(int, std::vector<int>)':
towers.cpp:15:30: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
15 | for (size_t i = 0; i + 1 < n; ++i)
| ~~~~~~^~~
towers.cpp:28:29: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
28 | while (peak_pos + 1 < n && h[peak_pos + 1] > h[peak_pos])
| ~~~~~~~~~~~~~^~~
towers.cpp: In function 'int max_towers(int, int, int)':
towers.cpp:38:15: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
38 | if (l >= peak_pos || r <= peak_pos)
| ~~^~~~~~~~~~~
towers.cpp:38:32: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
38 | if (l >= peak_pos || r <= peak_pos)
| ~~^~~~~~~~~~~
towers.cpp:42:1: warning: control reaches end of non-void function [-Wreturn-type]
42 | }
| ^