# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
251906 | 2020-07-23T05:03:24 Z | dwsc | On the Grid (FXCUP4_grid) | C++17 | 4 ms | 384 KB |
#include <bits/stdc++.h> #include "grid.h" using namespace std; std::vector<int> SortDisks(int N) { vector<int> l(N,-1); vector<int> order; for (int i = N; i >= 1; i--){ vector<int> unsolved; for (int j = 0; j < N; j++){ if (l[j] == -1) unsolved.push_back(j); } for (int j = 0; j < unsolved.size(); j++){ vector<int> query; query.push_back(unsolved[j]); // cout<< unsolved[j] << "\n"; for (int k = 0; k < unsolved.size(); k++) { if (k != j) { query.push_back(unsolved[k]); // cout << unsolved[k] << "\n"; } } for (int k = order.size()-1; k >= 0; k--) query.push_back(order[k]); int num = PutDisks(query); //cout <<num << "queried\n"; if (num == N-1+i){ int act = unsolved[j]; l[act] = i; order.push_back(act); break; } } } return l; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | Output is correct |
2 | Correct | 0 ms | 384 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 1 ms | 256 KB | Output is correct |
5 | Correct | 1 ms | 384 KB | Output is correct |
6 | Correct | 1 ms | 384 KB | Output is correct |
7 | Correct | 0 ms | 256 KB | Output is correct |
8 | Correct | 1 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | Output is correct |
2 | Correct | 0 ms | 384 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 1 ms | 256 KB | Output is correct |
5 | Correct | 1 ms | 384 KB | Output is correct |
6 | Correct | 1 ms | 384 KB | Output is correct |
7 | Correct | 0 ms | 256 KB | Output is correct |
8 | Correct | 1 ms | 256 KB | Output is correct |
9 | Incorrect | 4 ms | 384 KB | Output isn't correct |
10 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | Output is correct |
2 | Correct | 0 ms | 384 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 1 ms | 256 KB | Output is correct |
5 | Correct | 1 ms | 384 KB | Output is correct |
6 | Correct | 1 ms | 384 KB | Output is correct |
7 | Correct | 0 ms | 256 KB | Output is correct |
8 | Correct | 1 ms | 256 KB | Output is correct |
9 | Incorrect | 4 ms | 384 KB | Output isn't correct |
10 | Halted | 0 ms | 0 KB | - |