Submission #28398

#TimeUsernameProblemLanguageResultExecution timeMemory
28398탕탕탕! 핑거팁 니 맘을 겨눌게~ (#68)Bulb Game (FXCUP2_bulb)C11
1 / 1
0 ms1132 KiB
#include "bulb.h" int num; int arr[1001]; void Init(int N) { num = N; } int MakeTurn(int M) { arr[M] = 1; int result; result = (M + 2) % (num + 1); if (result == 0) result++; while (arr[result] == 1) { if (arr[result] == 1) result++; if (result > num) result = 1; } arr[result] = 1; return result; }
#Verdict Execution timeMemoryGrader output
Fetching results...