Submission #72429

# Submission time Handle Problem Language Result Execution time Memory
72429 2018-08-26T08:04:38 Z nvmdava Game (IOI14_game) C++17
Compilation error
0 ms 0 KB
#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

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