Can someone explain Atcoder 269 Problem F solution?

Revision en2, by yh11, 2022-09-19 11:14:01

I just read Problem F editorial.

I realise that computing the sum of the numbers in the box (when nothing is set to 0) is not very difficult. (Its just some interpolation of the sum of first n natural numbers). It becomes complicated when alternate values are set to 0.

In this editorial the answer has directly been provided and the explanation for the jumps in reasoning are skipped.

I was hoping someone could provide an explanation to fill in the gaps of this editorial.
Thanks. :)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English yh11 2022-09-19 11:14:01 107
en1 English yh11 2022-09-19 11:11:21 504 Initial revision (published)