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 'bool isOK(short int, short int, short int, short int)':
rect.cpp:98:48: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
98 | if (result && !sparseRD[rowB].findMIN(colB + 1, colE - 1, rowE)) result false;
| ~~~~~^~~
rect.cpp:38:26: note: initializing argument 1 of 'short int SparseMIN::findMIN(short int&, short int&, short int&)'
38 | short findMIN(short &l, short &r, short &val)
| ~~~~~~~^
rect.cpp:98:76: error: expected ';' before 'false'
98 | if (result && !sparseRD[rowB].findMIN(colB + 1, colE - 1, rowE)) result false;
| ^~~~~~
| ;
rect.cpp:98:70: warning: statement has no effect [-Wunused-value]
98 | if (result && !sparseRD[rowB].findMIN(colB + 1, colE - 1, rowE)) result false;
| ^~~~~~
rect.cpp:99:48: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
99 | if (result && !sparseRU[rowE].findMAX(colB + 1, colE - 1, rowB)) result false;
| ~~~~~^~~
rect.cpp:69:25: note: initializing argument 1 of 'bool SparseMAX::findMAX(short int&, short int&, short int&)'
69 | bool findMAX(short &l, short &r, short &val)
| ~~~~~~~^
rect.cpp:99:76: error: expected ';' before 'false'
99 | if (result && !sparseRU[rowE].findMAX(colB + 1, colE - 1, rowB)) result false;
| ^~~~~~
| ;
rect.cpp:99:70: warning: statement has no effect [-Wunused-value]
99 | if (result && !sparseRU[rowE].findMAX(colB + 1, colE - 1, rowB)) result false;
| ^~~~~~
rect.cpp:102:48: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
102 | if (result && !sparseCL[colB].findMIN(rowB + 1, rowE - 1, colE)) result false;
| ~~~~~^~~
rect.cpp:38:26: note: initializing argument 1 of 'short int SparseMIN::findMIN(short int&, short int&, short int&)'
38 | short findMIN(short &l, short &r, short &val)
| ~~~~~~~^
rect.cpp:102:76: error: expected ';' before 'false'
102 | if (result && !sparseCL[colB].findMIN(rowB + 1, rowE - 1, colE)) result false;
| ^~~~~~
| ;
rect.cpp:102:70: warning: statement has no effect [-Wunused-value]
102 | if (result && !sparseCL[colB].findMIN(rowB + 1, rowE - 1, colE)) result false;
| ^~~~~~
rect.cpp:103:48: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
103 | if (result && !sparseCR[colE].findMAX(rowB + 1, rowE - 1, colB)) result false;
| ~~~~~^~~
rect.cpp:69:25: note: initializing argument 1 of 'bool SparseMAX::findMAX(short int&, short int&, short int&)'
69 | bool findMAX(short &l, short &r, short &val)
| ~~~~~~~^
rect.cpp:103:76: error: expected ';' before 'false'
103 | if (result && !sparseCR[colE].findMAX(rowB + 1, rowE - 1, colB)) result false;
| ^~~~~~
| ;
rect.cpp:103:70: warning: statement has no effect [-Wunused-value]
103 | if (result && !sparseCR[colE].findMAX(rowB + 1, rowE - 1, colB)) result false;
| ^~~~~~
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]++;
| ~~~~~~~~~~^~~