Submission #1231555

#TimeUsernameProblemLanguageResultExecution timeMemory
1231555islam_2010Cave (IOI13_cave)C++20
Compilation error
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;
            
        }
    }
}

Compilation message (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[]);
      |     ^~~~~~~~~~~~~~