Please read the new rule regarding the restriction on the use of AI tools. ×

Approach

Revision ru1, by improvement_19, 2020-04-09 21:58:11

https://codeforces.me/contest/1291/problem/B Please help I am unable to approach this problem have seen several solution as well as editorial but failed to understand 1)why a[I]>I??what will happen if this not take place? 2)why there checking a[n-i-1] with the value n-i-1 ??what is the use of prefix array and suffix end array??

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian improvement_19 2020-04-09 21:58:11 341 First edition (опубликовано)