제출 #1231555

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

void tryCombination(int s[]);

void exploreCave(int n){
    int d[n], s[n];

    for(int i = 0; i <= n; i++){
        d[i] = i;
        s[i] = 0;
    }for(int i = 0; i <= n; i++){
        int k = tryCombination(s);
        if(k == -1){
            answer(s, d);
        }else if(k == i){
            s[i] = 1;
            
        }
    }
}

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

cave.cpp:5:6: error: ambiguating new declaration of 'void tryCombination(int*)'
    5 | void tryCombination(int s[]);
      |      ^~~~~~~~~~~~~~
In file included from cave.cpp:1:
cave.h:8:5: note: old declaration 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |     ^~~~~~~~~~~~~~