Help needed in december cook-off problem

Revision en2, by shubhamgoyal__, 2016-12-26 14:41:31

Can someone please help me out with this problem.
problem link
I saw a few accepted solutions and I'm guessing that the expected complexity is n*sqrt(n).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English shubhamgoyal__ 2016-12-26 14:41:31 39 Tiny change: 'ms/CHEFINS<br>\nI saw a ' -> 'ms/CHEFINS\nI saw a '
en1 English shubhamgoyal__ 2016-12-26 14:06:05 256 Initial revision (published)