Submission #302622

#TimeUsernameProblemLanguageResultExecution timeMemory
302622wilwxkRectangles (IOI19_rect)C++17
Compilation error
0 ms0 KiB
while (st.size()) st.pop(); for (int j = 0; j < m; j++) { stack<int> st; st.push(n); for (int i = n-1; i >= 0; i--) { while (st.top() != n && input[st.top()][j] < input[i][j]) st.pop(); mx[3][i+1][j+1] = (st.top()-1)+1; st.push(i); } }

Compilation message (stderr)

rect.cpp:1:1: error: expected unqualified-id before 'while'
    1 | while (st.size()) st.pop();
      | ^~~~~
rect.cpp:2:2: error: expected unqualified-id before 'for'
    2 |  for (int j = 0; j < m; j++) {
      |  ^~~
rect.cpp:2:18: error: 'j' does not name a type
    2 |  for (int j = 0; j < m; j++) {
      |                  ^
rect.cpp:2:25: error: 'j' does not name a type
    2 |  for (int j = 0; j < m; j++) {
      |                         ^