Submission #72429

#TimeUsernameProblemLanguageResultExecution timeMemory
72429nvmdavaGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
int a[1501];
int n;
void initialize(int n)
{
	::n = n;
	for(int i = 0; i < n; i++){
		a[i] = n;
	}
}
int hasEdge(int u, int v)
{
	if(a[u] == 1 || a[v] == 1){
		a[u] = 0;
		a[b] = 0;
		return 1;
	}
	a[u]--;
	a[v]--;
	return 0;
}

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:16:5: error: 'b' was not declared in this scope
   a[b] = 0;
     ^