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, x;
vector<int> w;
vector<vector<int>> am;
void initialize(int n){
N = n;
w.resize(N, N-1);
am.resize(N, vector<int>(N, 1));
x = 0;
}
int hasEdge(int u, int v){
if (w[u] == 1 || w[v] == 1){
return 1;
}
if ((x == 2) && (w[u] == 2 || w[v] == 2)) return 1;
w[u]--;
w[v]--;
//cout << w[u] << "\n";
if (w[u] == 1) x++;
if (w[v] == 1) x++;
//cout << x << "\n";
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... |