Submission #1207694

#TimeUsernameProblemLanguageResultExecution timeMemory
1207694jasonicThe Collection Game (BOI21_swaps)C++20
Compilation error
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); }

Compilation message (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);
      |                   ^