# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
199104 | 2020-01-29T11:41:45 Z | bsyo2k | On the Grid (FXCUP4_grid) | C++17 | 26 ms | 504 KB |
#include "grid.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1005; int chk[MAXN]; vector<int> SortDisks(int N) { vector<int> v, ans; ans.resize(N); for(int i = 0; i < N; i++) v.push_back(i); for(int i = 0; i < N; i++) chk[i] = -1; int X = PutDisks(v); while(!v.empty()) { vector<int> w; int t = v.back(); for(int i = v.size() - 1; i > 0; i--) v[i] = v[i - 1]; v[0] = t; int p = 0; for(int i = 0; i < N; i++) { if(chk[i] != -1) w.push_back(chk[i]); else w.push_back(v[p++]); } int Y = PutDisks(w); if(Y >= X) { t = v[0]; //ans[t] = Y; ans[t] = Y - N + 1; //for(int i = N - 1; w[i] != v[0]; i--) // ans[t]--; chk[ans[t] - 1] = t; for(int i = 0; i < v.size() - 1; i++) v[i] = v[i + 1]; v.pop_back(); } else X = Y; } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 376 KB | Output is correct |
2 | Correct | 6 ms | 376 KB | Output is correct |
3 | Correct | 5 ms | 376 KB | Output is correct |
4 | Correct | 6 ms | 376 KB | Output is correct |
5 | Correct | 6 ms | 504 KB | Output is correct |
6 | Correct | 6 ms | 376 KB | Output is correct |
7 | Correct | 5 ms | 376 KB | Output is correct |
8 | Correct | 5 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 376 KB | Output is correct |
2 | Correct | 6 ms | 376 KB | Output is correct |
3 | Correct | 5 ms | 376 KB | Output is correct |
4 | Correct | 6 ms | 376 KB | Output is correct |
5 | Correct | 6 ms | 504 KB | Output is correct |
6 | Correct | 6 ms | 376 KB | Output is correct |
7 | Correct | 5 ms | 376 KB | Output is correct |
8 | Correct | 5 ms | 256 KB | Output is correct |
9 | Correct | 7 ms | 376 KB | Output is correct |
10 | Correct | 6 ms | 376 KB | Output is correct |
11 | Correct | 7 ms | 424 KB | Output is correct |
12 | Correct | 6 ms | 380 KB | Output is correct |
13 | Correct | 6 ms | 376 KB | Output is correct |
14 | Correct | 7 ms | 376 KB | Output is correct |
15 | Correct | 8 ms | 352 KB | Output is correct |
16 | Correct | 6 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 376 KB | Output is correct |
2 | Correct | 6 ms | 376 KB | Output is correct |
3 | Correct | 5 ms | 376 KB | Output is correct |
4 | Correct | 6 ms | 376 KB | Output is correct |
5 | Correct | 6 ms | 504 KB | Output is correct |
6 | Correct | 6 ms | 376 KB | Output is correct |
7 | Correct | 5 ms | 376 KB | Output is correct |
8 | Correct | 5 ms | 256 KB | Output is correct |
9 | Correct | 7 ms | 376 KB | Output is correct |
10 | Correct | 6 ms | 376 KB | Output is correct |
11 | Correct | 7 ms | 424 KB | Output is correct |
12 | Correct | 6 ms | 380 KB | Output is correct |
13 | Correct | 6 ms | 376 KB | Output is correct |
14 | Correct | 7 ms | 376 KB | Output is correct |
15 | Correct | 8 ms | 352 KB | Output is correct |
16 | Correct | 6 ms | 376 KB | Output is correct |
17 | Correct | 8 ms | 376 KB | Output is correct |
18 | Correct | 16 ms | 352 KB | Output is correct |
19 | Correct | 21 ms | 392 KB | Output is correct |
20 | Correct | 26 ms | 376 KB | Output is correct |
21 | Correct | 13 ms | 376 KB | Output is correct |
22 | Correct | 21 ms | 380 KB | Output is correct |
23 | Correct | 23 ms | 376 KB | Output is correct |
24 | Correct | 22 ms | 396 KB | Output is correct |
25 | Correct | 23 ms | 376 KB | Output is correct |
26 | Correct | 26 ms | 376 KB | Output is correct |