답안 #609667

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
609667 2022-07-27T19:03:12 Z Ozy 분수 공원 (IOI21_parks) C++17
컴파일 오류
0 ms 0 KB

            construye(id[act], id[nuevo], mitad.X, mitad.Y);
            bancas[mitad] = 1;
            pila.push(nuevo);
            continua=true;
            break;
        }

        if (continua) {
            n--;
            continue;
        }
        pila.pop();
    }

    if (n > 1) return 0;

    build(u,v,a,b);
    return 1;
}

Compilation message

parks.cpp:3:22: error: expected constructor, destructor, or type conversion before '(' token
    3 |             construye(id[act], id[nuevo], mitad.X, mitad.Y);
      |                      ^
parks.cpp:4:13: error: 'bancas' does not name a type
    4 |             bancas[mitad] = 1;
      |             ^~~~~~
parks.cpp:5:13: error: 'pila' does not name a type
    5 |             pila.push(nuevo);
      |             ^~~~
parks.cpp:6:13: error: 'continua' does not name a type
    6 |             continua=true;
      |             ^~~~~~~~
parks.cpp:7:13: error: expected unqualified-id before 'break'
    7 |             break;
      |             ^~~~~
parks.cpp:8:9: error: expected declaration before '}' token
    8 |         }
      |         ^
parks.cpp:10:9: error: expected unqualified-id before 'if'
   10 |         if (continua) {
      |         ^~
parks.cpp:14:9: error: 'pila' does not name a type
   14 |         pila.pop();
      |         ^~~~
parks.cpp:15:5: error: expected declaration before '}' token
   15 |     }
      |     ^
parks.cpp:17:5: error: expected unqualified-id before 'if'
   17 |     if (n > 1) return 0;
      |     ^~
parks.cpp:19:10: error: expected constructor, destructor, or type conversion before '(' token
   19 |     build(u,v,a,b);
      |          ^
parks.cpp:20:5: error: expected unqualified-id before 'return'
   20 |     return 1;
      |     ^~~~~~
parks.cpp:21:1: error: expected declaration before '}' token
   21 | }
      | ^