# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
835063 | _martynas | Game (IOI14_game) | C++11 | 1082 ms | 2072 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 "game.h"
#include <bits/stdc++.h>
using namespace std;
const int mxn = 1505;
int n;
bool resp[mxn][mxn], decided[mxn][mxn];
bool adj[mxn][mxn];
void initialize(int N) {
n = N;
}
bool visited[mxn];
// check if it can be connected
void dfs_could(int u) {
visited[u] = true;
for(int v = 0; v < n; v++) if(!visited[v]) {
if(!decided[u][v] || adj[u][v]) {
dfs_could(v);
}
}
}
int hasEdge(int u, int v) {
resp[u][v] = resp[v][u] = true;
decided[u][v] = decided[v][u] = true;
fill(visited, visited+n, false);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |