This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grid.h"
#include <algorithm>
using namespace std;
std::vector<int> SortDisks(int n) {
vector<int> ans, tmp;
for(int i=0; i<n; i++) ans.push_back(i+1);
for(int i=0; i<n; i++) for(int j=i+1; j<n; j++){
tmp.push_back(i), tmp.push_back(j);
for(int k=0; k<n; k++) if(k!=i && k!=j) tmp.push_back(k);
int x = PutDisks(tmp);
swap(tmp[0], tmp[1]);
int y = PutDisks(tmp);
tmp.clear();
if(x>y) swap(ans[i],ans[j]);
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |