Submission #1207734

#TimeUsernameProblemLanguageResultExecution timeMemory
1207734jasonicThe 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) vector<int> a; void swapBig(int i, int j) { schedule(i, j); visit(); // we dont care abt output of visit since } void solve(int N, int V) { a = vector<int>(N); for(int i = 0; i < N; i++) a[i] = i+1; // bubble sort? N^2/2 works for st3 60%... for(int i = n-1; i > 0; i--) { for(int j = 0; j < i; j++) { swapBig(i, j); } } answer(a); }

Compilation message (stderr)

swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:22:17: error: 'n' was not declared in this scope
   22 |     for(int i = n-1; i > 0; i--) {
      |                 ^