#include "bits/stdc++.h"
#include "game.h"
using namespace std;
const int sz = 3e5 + 9;
int cnt[sz];
int turn;
int r;
void initialize(int n)
{
    memset(cnt, 0, sizeof(cnt));
    r = (n * (n - 1)) / 2;
    turn = 0;
    return;
}
int hasEdge(int u, int v)
{
    if (cnt[u] == 2 || cnt[v] == 2)
    {
        return 1;
    }
    if (turn == r)
    {
        return 1;
    }
    ++cnt[u];
    ++cnt[v];
    ++turn;
    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... |