Submission #408974

#TimeUsernameProblemLanguageResultExecution timeMemory
408974ly20The Collection Game (BOI21_swaps)C++17
0 / 100
54 ms256 KiB
// // --- Sample implementation for the task swaps --- // // To compile this program with the sample grader, place: // swaps.h swaps_sample.cpp sample_grader.cpp // in a single folder and run: // g++ swaps_sample.cpp sample_grader.cpp // in this folder. // #include "swaps.h" #include <bits/stdc++.h> using namespace std; bool cmp(int a, int b) { vector <int> temp; schedule(a, b); temp = visit(); int id = temp[0]; temp.clear(); return id == 1; } vector <int> rs; void solve(int N, int V) { // TODO implement this function int n = N, v = V; rs.clear(); for(int i = 1; i <= n; i++) { rs.push_back(i); } sort(rs.begin(), rs.end(), cmp); answer(rs); }

Compilation message (stderr)

swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:24:16: warning: unused variable 'v' [-Wunused-variable]
   24 |     int n = N, v = V;
      |                ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...