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

Автор atcoder_official, история, 13 месяцев назад, По-английски

We will hold AtCoder Regular Contest 210.

The point values will be 300-600-700-800-1000-1100.

We are looking forward to your participation!

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

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Is it div.1 or div.2?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

wow 6 prob arc!

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится -25 Проголосовать: не нравится

So hard!!!

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

ARC_T[1,2,3]=ABC_T[3,5,5]

»
12 месяцев назад, скрыть # |
← Rev. 4  
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve problem C? I don't know at all greedy (as an atcoder maxrating>=2100 user)

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

Can't believe another nonsensical ARC appears.

»
12 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -28 Проголосовать: не нравится

Why is my code wrong? link

I generated 5 million cases at random but all of the answers are correct.

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

    It seems there's an issue with your approach. The process of simulating the combination of smaller coins into larger ones should start from the smallest denomination and merge upwards, rather than only considering values 20 less than the current coin.

    A direct implementation of the above solution would be $$$O(n^2)$$$. Therefore, you need to merge the coins from the smallest to the largest denomination in one go, and then apply a greedy approach from the largest to the smallest denomination, breaking down the previously simulated merged coins. This would bring the complexity down to $$$O(n)$$$. Referring to my code might be helpful.

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

Just curious, when will rating get updated on kenkoooo. Most of the time it's pretty fast.