|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||25||15||15||60.000%|
Unhappy with the dim lighting in his barn, Farmer John has just installed a fancy new chandelier consisting of N (3 <= N <= 16) lights bulbs arranged in a circle.
The cows are fascinated by this new light fixture, and enjoy playing the following game: at time T, they toggle the state of each light bulb if its neighbor to the left was turned on at time T-1. They continue this game for B units of time (1 <= B <= 10^15). Note that B might be too large to fit into a standard 32-bit integer.
Given the initial states of the light bulbs, please determine their final states after B units of time have elapsed.
5 6 1 0 0 0 0
1 1 1 0 1
There are five light bulbs. The first is initially on, and the others are off.
The light bulb states are as follows: