# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28624 | tlwpdus 팬클럽 회장 (#68) | Bulb Game (FXCUP2_bulb) | C++14 | 0 ms | 1132 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bulb.h"
static int chk[1010];
void Init(int N){
chk[0] = chk[N + 1] = 1;
}
int MakeTurn(int M){
chk[M] = 1;
int lc = 0, rc = 0;
for(int i = M - 1; !chk[i]; i--) lc++;
for(int i = M + 1; !chk[i]; i++) rc++;
if(lc % 2){
chk[M - 1] = 1;
return M - 1;
}
chk[M + 1] = 1;
return M + 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |