Help needed in december cook-off problem

Revision en1, by shubhamgoyal__, 2016-12-26 14:06:05

Can someone please help me out with this problem.
problem link-> https://www.codechef.com/COOK77/problems/CHEFINS
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)