제출 #1207694

#제출 시각아이디문제언어결과실행 시간메모리
1207694jasonicThe Collection Game (BOI21_swaps)C++20
컴파일 에러
0 ms0 KiB
#include "swaps.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define fastIO cin.tie(0); ios::sync_with_stdio(false) void solve(int N, int V) { vector<int> a(n); for(int i = 0; i < n; i++) a[i] = i+1; sort(a.begin(), a.end(), [](const int &a, const int &b) { schedule(a, b); vector<int> x = visit(); return x[0] == 1; }); answer(a); }

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

swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:9:19: error: 'n' was not declared in this scope
    9 |     vector<int> a(n);
      |                   ^