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>
#define fi first
#define se second
#define eb emplace_back
#define em emplace
#define all(v) v.begin(), v.end()
#define report(x, l, s) stype[x] = s, location[x] = l, chk[x] = true
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
const int MAX = 2020;
const int INF = 1 << 30;
const ll LINF = 1LL << 60;
bool chk[MAX][MAX];
void initialize(int n) {
for(int i = 0; i < n; i++) chk[i][i] = true;
}
int hasEdge(int u, int v) {
if(chk[u][v]) return 1;
chk[u][v] = chk[v][u] = true;
for(int i = 0; i < MAX; i++) chk[u][i] = chk[v][i] = (chk[u][i] || chk[v][i]);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |