제출 #28515

#제출 시각아이디문제언어결과실행 시간메모리
28515뚜룹뚜룹뚜룹뚜스~>< (#68)Bulb Game (FXCUP2_bulb)C++11
1 / 1
0 ms1132 KiB
#include "bulb.h"

int n;
int arr[1010];

void Init(int N) {
	n = N;
}

int MakeTurn(int M) {
	int i;
	arr[M] = 1;
	for(i = 1; i <= n; i++){
		if(!arr[i]){ arr[i] = 1; return i; }
	}
}

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

bulb.cpp: In function 'int MakeTurn(int)':
bulb.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...