How to solve DISTX on SPOJ?

Правка en2, от mr_knownothing, 2017-06-21 21:29:18

As the title is pretty clear, I want to solve this problem DISTX but I am unable to design any algorithm within time limit. The best I can think of is an n2 approach.

Can anyone please help me solve this problem?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский mr_knownothing 2017-06-21 21:29:18 0 (published)
en1 Английский mr_knownothing 2017-06-21 21:28:46 293 Initial revision (saved to drafts)