제출 #148475

#제출 시각아이디문제언어결과실행 시간메모리
148475잉여로운 고3 (#200)On the Grid (FXCUP4_grid)C++17
0 / 100
6 ms384 KiB
#include "grid.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1005; vector<int> ans, ans2; bool chk[MAXN]; std::vector<int> SortDisks(int N) { ans.resize(N); for(int i = 0; i < N; i++) { vector<int> v; for(int j = 0; j < N; j++) if(!chk[j]) v.push_back(j); for(int j = N - i; j < N; j++) v.push_back(ans[j]); int X = PutDisks(v); int t = X - (N - i); ans[N - i - 1] = v[N - 1 - t]; chk[v[N - 1 - t]] = true; } ans2.resize(N); for(int i = 0; i < N; i++) ans2[ans[i]] = i + 1; return ans2; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...