Submission #701393

#TimeUsernameProblemLanguageResultExecution timeMemory
701393mychecksedadGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include <game.h>
using namespace std;

int r;
vector<int> a;
void initialize(int n){
	r = n;
	a.resize(n, n - 1);
}
int hasEdge(int u, int v){
	a[u]--, a[v]--;
	if(r <= n - 2){
		if(a[u] == 2 || a[v] == 2){
			return 1;
		}
	}else{
		if(a[u] == 1 || a[v] == 1)
			return 1;
	}
	return 0;
}

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:13:10: error: 'n' was not declared in this scope
   13 |  if(r <= n - 2){
      |          ^