Shafaet's blog

By Shafaet, history, 8 years ago, In English

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.

  • Vote: I like it
  • +46
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve 75pt?

  • »
    »
    8 years ago, # ^ |
    Rev. 3   Vote: I like it +23 Vote: I do not like it

    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.