Submission #1310680

#TimeUsernameProblemLanguageResultExecution timeMemory
1310680gabrielzCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { vector<int> truth; for (int i = 0; i < N; ++i) { for (int j = 0; j < N; ++j) { if (i == tryCombination(j)) { truth.push_back(j); } } } for (auto& it : truth) { cout << it << ' '; } }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:10:37: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   10 |             if (i == tryCombination(j)) {
      |                                     ^
      |                                     |
      |                                     int
In file included from cave.cpp:1:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~