Educational Codeforces Round 43 Div 2 C. Nested Segments RE



Can someone Explain me RE on test 84. And reason why it is occurring ?? And any method to get rig of this ??


Your compare function does not obey the C++ standard for comparision functions. The function must return true if the first argument is strictly less than the second, and false otherwise. You can check the documentation for details.


Thanks. @meooow Got AC. By Just changing true to false in case of equal elements. Earlier I used to think that I can return anything in case of equal elements. But I was wrong.