제출 #302622

#제출 시각아이디문제언어결과실행 시간메모리
302622wilwxkRectangles (IOI19_rect)C++17
컴파일 에러
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); } }

컴파일 시 표준 에러 (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++) {
      |                         ^