Submission #429692

#TimeUsernameProblemLanguageResultExecution timeMemory
429692mosiashvililukaThe Collection Game (BOI21_swaps)C++14
5 / 100
96 ms284 KiB
#include "swaps.h" #include<bits/stdc++.h> using namespace std; int a,b,c,d,e,i,j,ii,jj,zx,xc,V,bo[5009]; vector <int> vv,ans; void solve(int N, int VV) { a=N;V=VV; for(ii=1; ii<a; ii++){ c=a;while(bo[c]!=0) c--; for(i=a; i>=1; i--){ if(bo[i]==1||i==c) continue; schedule(i,c); vv=visit(); if(vv[0]==1){ c=i; } } ans.push_back(c); bo[c]=1; } for(i=1; i<=a; i++){ if(bo[i]==0){ ans.push_back(i);break; } } 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...