Help in debugging BOI 2012 Mobiles

Правка en4, от RestingRajarshi, 2019-05-18 19:20:46

this is the pdf link, see p2 (mobiles).

SOLUTION : binsrch on answer and check. however my code is giving error (WA). its quite small, so hopefully it will be readable.

Any help is appreciated.

PS: main function only has the binary search part. Check function checks if the dist chosen will cover the entire line. i have removed the redundant segments using deque using the fact that the points are already sorted by x coordinate

code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский RestingRajarshi 2019-05-18 19:20:46 278
en3 Английский RestingRajarshi 2019-05-18 19:19:31 28
en2 Английский RestingRajarshi 2019-05-18 19:18:22 20
en1 Английский RestingRajarshi 2019-05-18 19:17:43 1967 Initial revision (published)