Div2-B (Child and Set) problem.

Правка en2, от rr459595, 2018-06-19 20:42:10

Link to the problem:- http://codeforces.net/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 greedy approach(iterating from limit to 1) works here ?

Thanks.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский rr459595 2018-06-19 20:42:10 42
en1 Английский rr459595 2018-06-19 20:41:31 362 Initial revision (published)