Submission #117315

#TimeUsernameProblemLanguageResultExecution timeMemory
117315dolphingarlicGame (IOI14_game)C++14
0 / 100
2 ms384 KiB
#include "game.h"
#include <bits/stdc++.h>
using namespace std;

int cnt[1500];
bool first_time = true;

void initialize(int n) {
	for (int i = 0; i < n; i++) cnt[i] = n - 1;
}
int hasEdge(int u, int v) {
	if ((cnt[u] > 2 && cnt[v] > 2)) {
		cnt[u]--;
		cnt[v]--;
		return 0;
	} else if (first_time) {
		first_time = false;
		cnt[u]--;
		cnt[v]--;
		return 0;
	} else return 1;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...