# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159914 | rama_pang | Game (IOI14_game) | C++14 | 23 ms | 380 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;
int N, components;
bitset<1500> adj[1500], cur;
void initialize(int n) {
N = n;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
adj[i][j] = 1;
}
}
}
int hasEdge(int u, int v) {
adj[u][v] = 0;
adj[v][u] = 0;
cur = adj[0];
for (int i = 1; i < N; i++) {
if ((cur & adj[i]).count() > 0) cur |= adj[i];
if (cur.count() == N) return 0;
}
adj[u][v] = 1;
adj[v][u] = 1;
return 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |