Submission #527213

#TimeUsernameProblemLanguageResultExecution timeMemory
527213joelauOn the Grid (FXCUP4_grid)C++17
12 / 100
2 ms296 KiB
#include "grid.h" #include <bits/stdc++.h> using namespace std; std::vector<int> SortDisks(int N) { vector<int> v; for (int i = 0; i < N; ++i) v.push_back(i); for (int i = 0; i < N; ++i) { pair<int,int> most = make_pair(0,0); for (int j = 0; j < N-i; ++j) { swap(v[0],v[j]); most = max(most,make_pair(PutDisks(v),j)); swap(v[0],v[j]); } swap(v[most.second],v[N-i-1]); } vector<int> ans(N); for (int i = 0; i < N; ++i) ans[v[i]] = i+1; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...