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

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

We will hold Toyota Programming Contest 2023 Spring Qual A(AtCoder Beginner Contest 288).

The point values will be 100-200-300-400-500-500-600-600. Since this contest is used as a qualification round for a local event, the style of problems is modified a bit.

  • Up to task C is usual.
  • (the style of tasks D-Ex in this contest) is between (the style of tasks D-Ex in usual ABC) and (the style of earlier tasks in usual ARC).
  • Tasks in the middle of this contest are slightly harder than usual. Later tasks are not too difficult.

We are looking forward to your participation!

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

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

How to do problem D?
IMO problem D is of higher difficulty than usual one.

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

It looks like E is dp but i don't know how to solve it. Where can i find problems like this ?

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

screencast

For problem Ex, the solution in the editorial is a bit complicated. You can simply consider using the burnside lemma for all permutations on all $$$n$$$ numbers.

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

Japan has a different definition for "beginner"

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

I know E is Dp but can't figure out states. Someone please Explain?

  • »
    »
    4 года назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +6 Проголосовать: не нравится

    The key observation in $$$E$$$ is that if we bought $$$2$$$ items $$$i$$$ and $$$j$$$ ($$$i \lt j$$$), then for $$$i$$$ it will not matter whether we buy it before or after $$$j$$$, but for $$$j$$$ it will matter because if we bought $$$j$$$ first, we would use $$$C[j]$$$, otherwise we would use $$$C[j-1]$$$.

    So let $$$dp[i][j]$$$ be the least amount of money we can spend if we start from item $$$i$$$ and we bought $$$j$$$ items with indexes less than $$$i$$$. If item $$$i$$$ is not in $$$X$$$ we can consider the option of not buying it. For the other option of buying it, we can buy it first before buying any of the $$$j$$$ items (will use $$$C[i]$$$), or we can buy it after buying $$$1$$$ of the $$$j$$$ items (will use $$$C[i-1]$$$), and so on.

    So, we can have an array $$$mins$$$ where $$$mins[i][j]$$$ is the smallest $$$C[k]$$$ for $$$j\le k\le i$$$. So when we want consider buying item $$$i$$$ if we bought $$$j$$$ items with indexes less than $$$i$$$, we can set $$$dp[i][j] = min(dp[i][j], a[i]+mins[i][i-j]+dp[i+1][j+1])$$$.

    Submission

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

Missed D by 5 mins, rip ratings...
Tip: Never start a contest late, and that too by 5 mins.

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

What??? The difficulty of E is above 2000?????????

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

They had warned us friends : https://atcoder.jp/posts/975

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

Broo, I had some stupid bug in my code for E and couldn't fix it in time. After contest I realized that I could've easily got F had I tried :sad: