Submission #728651

#TimeUsernameProblemLanguageResultExecution timeMemory
728651vjudge1동굴 (IOI13_cave)C++17
Compilation error
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>>>  

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

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:10:16: error: array must be initialized with a brace-enclosed initializer
   10 |     int el[N] (0) ;
      |                ^