| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 208686 | E869120 | Cop and Robber (BOI14_coprobber) | C++14 | 61 ms | 1708 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "coprobber.h"
#include <vector>
using namespace std;
int N;
vector<int> X[509], I, J;
int cx = 0;
bool used[509];
int start(int NN, bool A[MAX_N][MAX_N]) {
N = NN;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (A[i][j] == 1) X[i].push_back(j);
}
}
return 0;
}
void dfs(int pos, int to) {
if (pos == to) { J = I; return; }
used[pos] = true;
for (int i : X[pos]) {
if (used[i] == true) continue;
I.push_back(i);
dfs(i, to);
I.pop_back();
}
}
int nextMove(int R) {
for (int i = 0; i < N; i++) used[i] = false;
I.clear(); J.clear();
I.push_back(cx);
dfs(cx, R);
cx = J[1];
return cx;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
