제출 #1304473

#제출 시각아이디문제언어결과실행 시간메모리
1304473lunarecho동굴 (IOI13_cave)C++20
컴파일 에러
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int n) { vector<int> s(n), d(n); iota(s.begin(), s.end(), 0); iota(d.begin(), d.end(), 0); answer(s, d); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:9:12: error: cannot convert 'std::vector<int>' to 'int*'
    9 |     answer(s, d);
      |            ^
      |            |
      |            std::vector<int>
In file included from cave.cpp:1:
cave.h:9:17: note:   initializing argument 1 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |             ~~~~^~~