제출 #1147728

#제출 시각아이디문제언어결과실행 시간메모리
1147728KickingKun게임 (IOI14_game)C++20
100 / 100
178 ms7044 KiB
#include <bits/stdc++.h>
#include "game.h"

using namespace std;

const int N = 1505;
int cnt[N];

void initialize(int n) {
	for (int i = 0; i < n; i++)
		cnt[i] = i;
}

int hasEdge(int u, int v) {
    if (u > v) swap(u, v);
    --cnt[v];
    if (cnt[v] == 0) return 1;
	else return 0;
	// o luot cuoi: da co n - 2 canh duoc noi truoc do
	// va luot nay se fix thanh cay
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...