Div2-B (Child and Set) problem.

Revision en1, by rr459595, 2018-06-19 20:41:31

Link to the problem:- http://codeforces.com/problemset/problem/437/B

I read the editorial where it says we have to use greedy approach by iterating from limit to 1. I don't understand why this approach works here.Iterating from 1 to limit doesn't work here.

Can someone help me in proving why that approach works ?

Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rr459595 2018-06-19 20:42:10 42
en1 English rr459595 2018-06-19 20:41:31 362 Initial revision (published)