#include "grid.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> SortDisks(int N) {
int n = N;
vector <int> v, r, a;
for (int i = 0; i < n; i++) v.push_back (i);
for (int i = 1; i <= n; i++) {
int x = PutDisks(v);
swap (v[2*n-i-x], v[n-i]);
}
for (int i = 0; i < n; i++) {
a.push_back (0);
}
for (int i = 0; i < n; i++) {
//a[v[i]] = i+1;
a[v[i]] = i+1;
}
return a;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
364 KB |
Output is correct |
2 |
Runtime error |
6 ms |
384 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
364 KB |
Output is correct |
2 |
Runtime error |
6 ms |
384 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
364 KB |
Output is correct |
2 |
Runtime error |
6 ms |
384 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |