# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
835270 | _martynas | Game (IOI14_game) | C++11 | 1082 ms | 2720 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 adj[mxn][mxn];
bool seen[mxn][mxn];
bool visited[mxn];
void initialize(int N) {
n = N;
}
void get_comp(int u, vector<int> &comp) {
visited[u] = true;
comp.push_back(u);
for(int v = 0; v < n; v++) if(u != v && !visited[v] && adj[u][v]) {
get_comp(v, comp);
}
}
int hasEdge(int u, int v) {
vector<int> compu, compv;
fill(visited, visited+mxn, false);
get_comp(u, compu);
fill(visited, visited+mxn, false);
get_comp(v, compv);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |