Блог пользователя RestingRajarshi

Автор RestingRajarshi, история, 7 лет назад, По-английски

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
  • Проголосовать: нравится
  • -5
  • Проголосовать: не нравится

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by RestingRajarshi (previous revision, new revision, compare).

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by RestingRajarshi (previous revision, new revision, compare).

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by RestingRajarshi (previous revision, new revision, compare).

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think that part "I have removed the redundant segments using deque using the fact that the points are already sorted by x coordinate" is incorrect.