Submission #28294

# Submission time Handle Problem Language Result Execution time Memory
28294 2017-07-16T04:27:58 Z AcornCkiGuiziTeam(#1202, dotorya, cki86201, zigui) Bulb Game (FXCUP2_bulb) C++14
Compilation error
0 ms 0 KB
int D[1005];

void Init(int N) {
}

int MakeTurn(int M) {
	D[M] = 1;
	for (int i = 1; i <= N; i++) if (D[i] == 0) {
		D[i] = 1;
		return i;
	}
}

Compilation message

bulb.cpp: In function 'int MakeTurn(int)':
bulb.cpp:9:23: error: 'N' was not declared in this scope
  for (int i = 1; i <= N; i++) if (D[i] == 0) {
                       ^