|
|
back to boardWA #8 Does anyone know the 8th test? Re: WA #8 The test is such an input data That if the program behaves as burunduk1 described in his habrahabr.ru post from 2015 It passes the test (And all others tests too) Re: WA #8 So, sort intervals according to RIGHT endpoints in non-decreasing order. Consider intervals in the sorted order. Let M=max of all right ends added so far. Then if current left end is not less than M then add current interval to answer and update M if current right end is greater than M. |
|
|