Submission #558049

#TimeUsernameProblemLanguageResultExecution timeMemory
558049InternetPerson10The Collection Game (BOI21_swaps)C++17
12 / 100
511 ms536 KiB
#include "swaps.h" #include <bits/stdc++.h> using namespace std; void solve(int N, int V) { srand(time(NULL)); vector<int> x(N); for(int i = 0; i < N; i++) x[i] = i + 1; vector<int> shuff(N); for(int i = 0; i < N; i++) { shuff[i] = i+1; } while(V--) { for(int i = 0; i < N; i++) { int g = rand() % N; swap(shuff[i], shuff[g]); } for(int i = 0; i < N-1; i += 2) { schedule(min(shuff[i], shuff[i+1]), max(shuff[i], shuff[i+1])); } visit(); } answer(x); }
#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...