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 'short int SparseMIN::findMIN(short int&, short int&)':
rect.cpp:41:35: warning: array subscript has type 'char' [-Wchar-subscripts]
41 | return std::min(sparse[l][lg], sparse[r - (1 << lg) + 1][lg]);
| ^~
rect.cpp:41:66: warning: array subscript has type 'char' [-Wchar-subscripts]
41 | return std::min(sparse[l][lg], sparse[r - (1 << lg) + 1][lg]);
| ^~
rect.cpp: In member function 'void SparseMAX::build(short int*, short int)':
rect.cpp:62:81: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
62 | sparse[i][lg] = std::max(sparse[i][lg - 1], sparse[i + (1 << lg - 1)][lg - 1]);
| ~~~^~~
rect.cpp: In member function 'short int SparseMAX::findMAX(short int&, short int&)':
rect.cpp:70:35: warning: array subscript has type 'char' [-Wchar-subscripts]
70 | return std::max(sparse[l][lg], sparse[r - (1 << lg) + 1][lg]);
| ^~
rect.cpp:70:66: warning: array subscript has type 'char' [-Wchar-subscripts]
70 | return std::max(sparse[l][lg], sparse[r - (1 << lg) + 1][lg]);
| ^~
rect.cpp: In function 'bool isOK(short int, short int, short int, short int)':
rect.cpp:90:37: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
90 | if (sparseRD[rowB].findMIN(colB + 1, colE - 1) < rowE) return false;
| ~~~~~^~~
rect.cpp:38:26: note: initializing argument 1 of 'short int SparseMIN::findMIN(short int&, short int&)'
38 | short findMIN(short &l, short &r)
| ~~~~~~~^
rect.cpp:91:37: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
91 | if (sparseRU[rowE].findMAX(colB + 1, colE - 1) > rowB) return false;
| ~~~~~^~~
rect.cpp:67:26: note: initializing argument 1 of 'short int SparseMAX::findMAX(short int&, short int&)'
67 | short findMAX(short &l, short &r)
| ~~~~~~~^
rect.cpp:92:37: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
92 | if (sparseCL[colB].findMIN(rowB + 1, rowE - 1) < colE) return false;
| ~~~~~^~~
rect.cpp:38:26: note: initializing argument 1 of 'short int SparseMIN::findMIN(short int&, short int&)'
38 | short findMIN(short &l, short &r)
| ~~~~~~~^
rect.cpp:93:37: error: cannot bind non-const lvalue reference of type 'short int&' to an rvalue of type 'short int'
93 | if (sparseCR[colE].findMAX(rowB + 1, rowE - 1) > colB) return false;
| ~~~~~^~~
rect.cpp:67:26: note: initializing argument 1 of 'short int SparseMAX::findMAX(short int&, short int&)'
67 | short findMAX(short &l, short &r)
| ~~~~~~~^
rect.cpp: In function 'llong count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:121:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
121 | while (st.size()) st.pop(); st.push(m + 1);
| ^~~~~
rect.cpp:121:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
121 | while (st.size()) st.pop(); st.push(m + 1);
| ^~
rect.cpp:133:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
133 | while (st.size()) st.pop(); st.push(0);
| ^~~~~
rect.cpp:133:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
133 | while (st.size()) st.pop(); st.push(0);
| ^~
rect.cpp:148:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
148 | while (st.size()) st.pop(); st.push(n + 1);
| ^~~~~
rect.cpp:148:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
148 | while (st.size()) st.pop(); st.push(n + 1);
| ^~
rect.cpp:160:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
160 | while (st.size()) st.pop(); st.push(0);
| ^~~~~
rect.cpp:160:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
160 | while (st.size()) st.pop(); st.push(0);
| ^~
rect.cpp:176:29: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
176 | if ((1 << getLOG[i] + 1) < i) getLOG[i]++;
| ~~~~~~~~~~^~~