satyaki3794's blog

By satyaki3794, history, 7 years ago, In English

Hello Codeforces Community!

I invite you all to take part in HackerRank's HourRank contest, scheduled on the 2nd of July 2017 at 20:30 IST.

Problems have been set by by me. I'd like to thank kevinsogo for his invaluable help in testing the problems and in all other aspects of the contest.

The problems will have subtasks to make them interesting for everyone. I strongly recommend to read all the problems.

The contestants are ranked by score. If two contestants get the same score, the person who reached the score first is ranked higher. Top 10 winners will receive a HackerRank T-Shirt.

Best of luck! :)

UPD: Contest has ended. Editorials are out. Congratulations to the top 10!
1. arsijo
2. adamant
3. kmjp
4. irkstepanov
5. RAVEman
6. SmallBoy
7. Tima
8. sahedsohel
9. fmota
10. lzw4896s

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

»
7 years ago, # |
  Vote: I like it +20 Vote: I do not like it

Contest starts in around 2 hours.

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

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

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

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

»
7 years ago, # |
Rev. 3   Vote: I like it +32 Vote: I do not like it

Easy solution for the last problem:

Let be the best cost for splitting first boxes. If we consider segments , there will be no more than different -values on it. We can check all of them in using array in which for each bit we keep the latest position where we met it. And for each value we should take the longest segment having it. We also have to calculate the longest possible suffix which is possible to take due to distinct values restrictions.

Code: link

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    Yes, the tester's code uses this observation, but he has used binary search to find these ranges, instead of checking the last position where each bit was modified.