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

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

Hi, I would like to invite you to take part in HackerRank HourRank-8 on 2nd May.

HourRank is an one hour long programming competition. In this round, there will be only 3 problems. We tried to make it interesting for both beginners and experts.

The authors of this round are tunyash, forthright48 and me. Thanks for wanbo for testing the problems.

Top-10 will get a nice HackerRank Tshirt!

Happy Coding!

Update:

Score of the problems are 25-50-75.

Update:

The contest has ended, congrats to the winners.

Special congrats to uwi for solving all the problems.

  • Проголосовать: нравится
  • +46
  • Проголосовать: не нравится

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

How to solve 75pt?

  • »
    »
    9 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится +23 Проголосовать: не нравится

    Segment-tree-like data structure.

    If optimal path goes through column m / 2, we can calculate all such lengths doing dijkstra from middle column. Or we go to the left or right half of columns and do such step recursively again, then take the minimum on each step.