Submission #1040838

#TimeUsernameProblemLanguageResultExecution timeMemory
1040838eitanelbThe Collection Game (BOI21_swaps)C++14
50 / 100
35 ms1400 KiB
#include "swaps.h" #include<bits/stdc++.h> using namespace std; void solve(int N, int V) { int n=N; vector<int> v(N); for(int i=0;i<N;i++) v[i]=i+1; for(int i=1;i<=n;i++){ int j=2; if(i%2) j=1; for(int u=j;u<n;u+=2) schedule(v[u-1],v[u]); vector<int> w = visit(); for(int u=j;u<n;u+=2) if(w[(u-1)/2]==0) swap(v[u],v[u-1]); } answer(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...