rect.cpp: In member function 'void SparseMIN::build(short int*, short int)':
rect.cpp:33:81: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
33 | sparse[i][lg] = std::min(sparse[i][lg - 1], sparse[i + (1 << lg - 1)][lg - 1]);
| ~~~^~~
rect.cpp: In member function 'void SparseMAX::build(short int*, short int)':
rect.cpp:64:81: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
64 | sparse[i][lg] = std::max(sparse[i][lg - 1], sparse[i + (1 << lg - 1)][lg - 1]);
| ~~~^~~
rect.cpp: In function 'llong count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:132:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
132 | while (st.size()) st.pop(); st.push(m + 1);
| ^~~~~
rect.cpp:132:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
132 | while (st.size()) st.pop(); st.push(m + 1);
| ^~
rect.cpp:144:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
144 | while (st.size()) st.pop(); st.push(0);
| ^~~~~
rect.cpp:144:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
144 | while (st.size()) st.pop(); st.push(0);
| ^~
rect.cpp:159:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
159 | while (st.size()) st.pop(); st.push(n + 1);
| ^~~~~
rect.cpp:159:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
159 | while (st.size()) st.pop(); st.push(n + 1);
| ^~
rect.cpp:171:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
171 | while (st.size()) st.pop(); st.push(0);
| ^~~~~
rect.cpp:171:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
171 | while (st.size()) st.pop(); st.push(0);
| ^~
rect.cpp:187:29: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
187 | if ((1 << getLOG[i] + 1) < i) getLOG[i]++;
| ~~~~~~~~~~^~~
rect.cpp:240:48: error: binding reference of type 'short int&' to 'const short int' discards qualifiers
240 | answer += isOK(rowB, colB, rowE, colE);
| ^~~~
rect.cpp:92:44: note: initializing argument 3 of 'bool isOK(short int&, short int&, short int&, short int&)'
92 | bool isOK(short &rowB, short &colB, short &rowE, short &colE)
| ~~~~~~~^~~~