#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Incorrect |
5 ms |
256 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Incorrect |
5 ms |
256 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Incorrect |
5 ms |
256 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |