# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1070804 | ortsac | Cop and Robber (BOI14_coprobber) | C++17 | 1 ms | 600 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 <bits/stdc++.h>
#include "coprobber.h"
using namespace std;
int atual = 0;
int n;
vector<vector<int>> adj;
int col = 0x3f3f3f3f;
int row;
int x[] = {-1, -1, 1, 1};
int y[] = {-1, 1, -1, 1};
int start(int N, bool A[MAX_N][MAX_N]) {
// realmente não importa qual posição ele inicia
// pq ele pode só ir andando pra qualquer uma e o cara escolhe de qualquer jeito então fodase
n = N;
adj.resize(n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (A[i][j]) adj[i].push_back(j);
}
}
for (int i = 0; i < n; i++) {
if (adj[i].size() == 2) {
if (i != 0) col = min(col, i + 1);
}
}
# | 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... |