이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |