Can someone prove this solution?

Revision en1, by bokuto_alright, 2024-04-10 08:17:06

Question here: https://www.codechef.com/practice/course/4-star-difficulty-problems/DIFF1900/problems/SEGDIV?tab=statement

I'm intrigued about this submission over here: https://www.codechef.com/viewsolution/82916450

I have no idea why it works. The poster also just left out the proof part and simply wrote, "It's difficult to prove it". Is there any proof of this or is just conveniently satisfies for the given question's constraints? (n <= 500)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bokuto_alright 2024-04-10 08:17:06 489 Initial revision (published)