# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
328353 | seedkin | On the Grid (FXCUP4_grid) | C++17 | 1 ms | 492 KiB |
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"
int candi[1005][1005];
std::vector<int> SortDisks(int N) {
std::vector<int> disks; // i번째로 넣을 막대,(막대 번호)
std::vector<int> ans; // i번째 막대의 길이, a[i] = N
int result;
disks.resize(N);
ans.resize(N);
for(int i = 0; i <= N; i++) {
for(int j = 0; j <= N; j++) {
candi[i][j] = 1;
}
}
for(int i = 0; i < N; i++) {
disks[i] = i;
}
for(int i = 0; i < N; i++) {
int result = PutDisks(disks);
if(result == N) {
// return case
}
int diff = result - N;
for(int j = 0; j < N; j++ ) {
for(int l = N - diff - j; l >=0; l--) {
candi[disks[j]][N-j] = 0;
}
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |