제출 #28294

#제출 시각아이디문제언어결과실행 시간메모리
28294AcornCkiGuiziTeam (#68)Bulb Game (FXCUP2_bulb)C++14
컴파일 에러
0 ms0 KiB
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; } }

컴파일 시 표준 에러 (stderr) 메시지

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) {
                       ^