#include "game.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD (1000000000+7)
#define MOD1 (998244353)
#define pb push_back
#define all(x) x.begin(), x.end()
#define en cout << '\n'
#define ff first
#define ss second
#define pii pair<int,int>
#define vi vector<int>
const int N = 1000+100, M = 1e5+10, K = 52, MX = 30;
vector<int> c;
int x = 0;
void initialize(int n) {
c.resize(n, n-1);
x = 0;
}
int hasEdge(int u, int v) {
--c[u], --c[v];
if(c[u] == 1) ++x;
else if(c[u] == 0) --x;
if(c[v] == 1) ++x;
else if(c[v] == 0) --x;
if(x == 0){
if(c[u] == 0 || c[v] == 0) return 1;
return 0;
}
if(x > 1 && (c[u] == 0 || c[v] == 0)) return 1;
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... |