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

Автор hmehta, история, 4 года назад, По-английски

Hey All!

Topcoder SRM 776 is scheduled to start at 07:00 UTC -5, Jan 25, 2020. Registration is now open in the Web Arena or Applet and will close 5 minutes before the match begins.

Thanks misof for writing the problems and coordinating the round.

This is the third SRM of Stage 2 of TCO20 Algorithm Tournament and TCO20 Regional Events Qualification

Stage 2 TCO20 Points Leaderboard | Topcoder Java Applet | Upcoming SRMs and MMs

Some Important Links

Match Results (To access match results, rating changes, challenges, failure test cases)
Problem Archive (Top access previous problems with their categories and success rates)
Problem Writing (To access everything related to problem writing at Topcoder)
Algorithm Rankings (To access Algorithm Rankings)
Editorials (To access recent Editorials)

Good luck to everyone!

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

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

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

Why my approach is wrong for Div2 B?

I am finding the depth of leaf node and subtracting from N for the maximum answer. My code

Thank you!

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +64 Проголосовать: не нравится

    The smallest test case where your code fails is N = 6. The problem is that in the heap with 6 nodes the last layer isn't full yet, but there are already no leaves in the previous layer. Your solution thinks there are still some, and claims that you can have the value 5 in a leaf.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +69 Проголосовать: не нравится

      What's up with the downvotes? Do I now have a personal army of haters for some reason, or is there something actually wrong with what I wrote?

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

The smallest counter-test to my 1000:

{1,2,2,3,5,6,6,7,7,8,8,9,9,10,12,13,13,14,19,20,20,21,23,24,24,25,25,26,26,27,27,28,30,31,31,32} {1,3,3,5,5,7,10,12,12,13,14,14,15,15,16,17,17,19,22,24,24,25,26,26,27,27,28,29,29,31,34,36,36,38,38,40}

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

Point leaderboard seems to be not working.