POJ1176总结
To brighten up the gala dinner of the IOI’98 we have a set of N coloured lamps numbered from
1 to N. The lamps are connected to four buttons:
button 1 — when this button is pressed, all the lamps change their state: those that are ON are turned OFF and those that are OFF are turned ON.
button 2 — changes the state of all the odd numbered lamps.
button 3 — changes the state of all the even numbered lamps.
button 4 — changes the state of the lamps whose number is of the form 3K+1 (with K >= 0), i.e., 1,4,7,…
There is a counter C which records the total number of button presses.
When the party starts, all the lamps are ON and the counter C is set to zero.