제출 #64881

#제출 시각아이디문제언어결과실행 시간메모리
64881MatheusLealV게임 (IOI14_game)C++17
15 / 100
10 ms1096 KiB
#include <bits/stdc++.h>
#define maxn 1550
using namespace std;
typedef long long ll;

int block[maxn], n, ligacoes, faltam;

int hasEdge(int u, int v)
{
	if(block[u] == n - 2 || block[v] == n - 2 || ligacoes >= faltam)
	{
		ligacoes --;

		faltam --;

		return 1;
	}

	block[u] ++, block[v] ++;

	faltam --;

	return 0;
}

void initialize(int N_)
{
	n = N_;

	faltam = n*(n - 1)/2;

	ligacoes = n - 1;

	memset(block, 0, sizeof block);

}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...