# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
208688 | E869120 | Cop and Robber (BOI14_coprobber) | C++14 | 5 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "coprobber.h"
#include <vector>
using namespace std;
int N, M;
vector<int> X[509], I, J;
int cx = 0;
bool used[509];
int start(int NN, bool A[MAX_N][MAX_N]) {
N = NN; int cnt = 0;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (A[i][j] == 1) { X[i].push_back(j); if (i < j) cnt++; }
}
}
M = cnt;
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();
}
}
# | 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... |