제출 #670622

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

using namespace std;

const int MAXN = 5 * 1e3;

int s[MAXN];
int d[MAXN];

//int tryCombination(int S[]);
//void answer(int S[],int D[]);

void exploreCave(int n){
    //case 1 -> si <-> di
    int res;
    do{
        res = tryCombination(s);
        if(res != -1){
            s[res]+=1;
        }
    }while(res != -1)
    answer(s, d);
}

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; i++){
        s[i] = 0;
        d[i] = i;
    }
    exploreCave(n);
    return 0;
}

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:23:22: error: expected ';' before 'answer'
   23 |     }while(res != -1)
      |                      ^
      |                      ;
   24 |     answer(s, d);
      |     ~~~~~~