Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

Shark help

Revision en1, by bhikkhu, 2018-06-05 17:29:25

http://mirror.codeforces.com/contest/982/problem/D

I don't get why we need to add +1 to a[i]. I understand that we need to add if n = 1. But why do we need to do so in other cases?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bhikkhu 2018-06-05 17:29:25 188 Initial revision (published)