제출 #728647

#제출 시각아이디문제언어결과실행 시간메모리
728647vjudge1동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;

#define N '\n';
#define VI <vector <int>>
#define VVI <vector <vector <int>>>  

int exploreCave(int N){
    vector <int> el (N, 0) ;
    lastAns = -2;
    int i = -1;
    while(lastAns != -1){
        if(i != -1){
            el[i] = 1;
        }
        lastAns = tryCombination(el);
        i = lastAns;
    }
    vector <int >d[i](N);
    for(int i = 0; i < N; i++){
        d[i] = i;
    }
    answer(el, d);
}

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp:5:11: error: expected ',' or '...' before '\xa'
    5 | #define N '\n';
      |           ^~~~
cave.cpp:9:21: note: in expansion of macro 'N'
    9 | int exploreCave(int N){
      |                     ^
cave.cpp:5:15: error: expected ')' before ';' token
    5 | #define N '\n';
      |               ^
cave.cpp:9:21: note: in expansion of macro 'N'
    9 | int exploreCave(int N){
      |                     ^
cave.cpp:9:16: note: to match this '('
    9 | int exploreCave(int N){
      |                ^
cave.cpp:9:5: error: ambiguating new declaration of 'int exploreCave(int)'
    9 | int exploreCave(int N){
      |     ^~~~~~~~~~~
In file included from cave.cpp:1:
cave.h:10:6: note: old declaration 'void exploreCave(int)'
   10 | void exploreCave(int N);
      |      ^~~~~~~~~~~
cave.cpp:9:22: error: expected unqualified-id before ')' token
    9 | int exploreCave(int N){
      |                      ^