Submission #971664

#TimeUsernameProblemLanguageResultExecution timeMemory
971664idasThe Collection Game (BOI21_swaps)C++17
3 / 100
29 ms496 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 <bits/stdc++.h> using namespace std; #include "swaps.h" #define FOR(i, begin, end) for(int i=(begin); i<(end); i++) #define sz(x) int((x).size()) #define pb push_back #define s second #define f first typedef vector<int> vi; typedef pair<int, int> pii; const int NN=510; bool cmp[NN][NN]; void solve(int n, int v) { vi ans(n); FOR(i, 0, n) ans[i]=i+1; FOR(i, 1, n+1) { FOR(j, i+1, n+1) { schedule(i, j); vi get=visit(); if(get.back()==0){ swap(ans[i-1], ans[j-1]); } } } answer(ans); }
#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...