http://www.usaco.org/index.php?page=viewproblem2&cpid=643
Can anyone please explain me this problem statement as well as it’s solution in some easy way…
I’m not getting Q as well as it solution from editorial
Thanks
http://www.usaco.org/index.php?page=viewproblem2&cpid=643
Can anyone please explain me this problem statement as well as it’s solution in some easy way…
I’m not getting Q as well as it solution from editorial
Thanks
The problem is asking you to split the (multi)set of diamonds into 2 (multi)sets that are close in size (specified by K)
So you want to sort the diamonds from smallest to largest and start working from both ends, gradually moving to the middle.