Help needed on Problem 372A

Правка en2, от parth_15, 2017-09-24 10:33:00

Hello everyone, I was solving this problem but I am constantly getting WASubmission. I have used greedy approach. I first sorted the array and started checking from right to left that if we can find pair for ith index,then match up. Treeset is used for that purpose. But I am not able to find any bug. Please help.

Теги greedy, treeset, help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский parth_15 2017-09-24 10:33:00 8 Tiny change: 'ving this problem [problem]' -> 'ving this [problem]'
en1 Английский parth_15 2017-09-24 10:32:25 457 Initial revision (published)