| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 151850 | gs14004 | On the Grid (FXCUP4_grid) | C++17 | 17 ms | 420 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "grid.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> SortDisks(int n){
vector<int> v(n), ans(n);
iota(v.begin(), v.end(), 0);
int p = PutDisks(v), f = 0;
while(f < n){
auto w = v;
rotate(w.begin(), w.end() - f - 1, w.end() - f);
int q = PutDisks(w);
if(q >= p){
ans[w[0]] = q - n + 1; f++;
sort(v.end() - f, v.end(), [&](const int &a, const int &b){ return ans[a] < ans[b]; });
}
else p = q, v = w;
}
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... | ||||
