제출 #1164050

#제출 시각아이디문제언어결과실행 시간메모리
1164050Aliyyiakbar게임 (IOI14_game)C++20
15 / 100
1 ms1604 KiB
#include "bits/stdc++.h"
#include "game.h"
using namespace std;

const int sz = 3e5 + 9;
int cnt[sz];
int turn;

void initialize(int n)
{
    memset(cnt, 0, sizeof(cnt));
    turn = 0;
    return;
}

int hasEdge(int u, int v)
{
    if (cnt[u] == 2 || cnt[v] == 2)
    {
        return 1;
    }
    if (turn == 3)
    {
        return 1;
    }
    ++cnt[u];
    ++cnt[v];
    ++turn;
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...