# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28655 | 핑응핑응 홍신정 (#68) | Bulb Game (FXCUP2_bulb) | C11 | 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"
int button[1111];
int NN;
void Init(int N) {
// do nothing
NN = N;
}
int MakeTurn(int M) {
button[M] = 1;
for (int i = 2; i <= NN+1; i*=2) {
if (button[(M + i) % (NN + 1)] == 0) {
button[(M + i) % (NN + 1)] = 1;
if ((M + i) % (NN + 1) == 0)
return 1;
return (M + i) % (NN + 1);
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |