제출 #1016479

#제출 시각아이디문제언어결과실행 시간메모리
1016479MohamedFaresNebiliThe Collection Game (BOI21_swaps)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; bool cmp(int i, int j) { schedule(i, j); vector<int> K = visit(); return K[0] == 1; } void solve(int N, int V) { vector<int> res(N); for(int l = 0; l < N; l++) res[l] = l + 1; sort(res.begin(), res.end(), cmp); answer(res); }

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

swaps.cpp: In function 'bool cmp(int, int)':
swaps.cpp:7:17: error: 'schedule' was not declared in this scope
    7 |                 schedule(i, j);
      |                 ^~~~~~~~
swaps.cpp:8:33: error: 'visit' was not declared in this scope
    8 |                 vector<int> K = visit();
      |                                 ^~~~~
swaps.cpp:8:33: note: 'std::visit' is only available from C++17 onwards
swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:17:17: error: 'answer' was not declared in this scope
   17 |                 answer(res);
      |                 ^~~~~~