제출 #1310680

#제출 시각아이디문제언어결과실행 시간메모리
1310680gabrielz동굴 (IOI13_cave)C++20
컴파일 에러
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 << ' '; } }

컴파일 시 표준 에러 (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[]);
      |                    ~~~~^~~