Help in solving RTE

Правка en1, от FlyingElephant, 2023-08-01 21:09:17

I was solving this problem. But I keep getting RTE on test2 and I dont understand why.

My idea is selecting the smallest 2*n elements by putting them into a set. Then I use two pointers on the array sorted by coordinate component in order to get the system of nested segments. No wonder what goes wrong with that.

SUBMISSION

Теги runtime error

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский FlyingElephant 2023-08-01 21:09:17 460 Initial revision (published)