Help in understanding code !!

Revision en5, by Roronoa__Zoro, 2024-01-06 06:48:55

Below is given the code of following problem : 1907G - Lights. Can anyone explain me how the code for cyclic portion works.

Spoiler

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English Roronoa__Zoro 2024-01-06 06:48:55 1
en4 English Roronoa__Zoro 2024-01-06 06:48:41 1
en3 English Roronoa__Zoro 2024-01-05 16:38:18 1
en2 English Roronoa__Zoro 2024-01-04 19:08:03 113
en1 English Roronoa__Zoro 2024-01-04 19:06:04 1405 Initial revision (published)