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

Автор rng_58, история, 8 лет назад, По-английски

AtCoder Grand Contest 012 will be held on Saturday (time). The writer is camypaper.

Contest Link

Contest Announcement

The point values are 300 — 700(200) — 1000 — 1000 — 1000 — 2000.

Let's discuss problems after the contest.

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

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

Sorry, but what does 700(200) mean? Is it partial score?

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

Do you get time penalty (for a wrong submission) towards 700 if you solve only 200?

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Will we have editorials in english this time ?

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится -8 Проголосовать: не нравится

gonna participate this one after months of blank

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

Wow! japan server near my country which is Philippines, meaning I dont have to stay up late at night when participating in contests :)

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

I give up... I know Grand Contests are usually very difficult, but today contest seems only made for red guy on Codeforces...

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

    Tasks weren't that hard in my opinion, at least implementation was easy. They required more thinking instead of coding.

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

      That's kind of how most Atcoder problems are; not tedious to implement but hard to solve.

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

      After I read the editorial for problem B to E, problem seems easier than I thought.

      I think I need to practice more on contest like this to improve my thinking skill.

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

That moment when you're ~2 minutes from getting AC (on D) T_T

Never forget the line

if(u == v) return ;

in the merge function of DSU again T_T

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

Thanks for the fun problemset! I thought today had some interesting challenges. Even though I only solved A,C,D I think the solution to problem B and E are also very nice and are my favorite problems today.

Personally, I am still kicking myself for not seeing the solution to C quickly enough, but what can you do.

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

why e 1000pt TTTT

  • »
    »
    8 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +15 Проголосовать: не нравится

    It is because of all the silly people like me who do not know how to use bitmask dp. (for example, IOI p2 subtask 2)

    EDIT: Oops. Since you solved E I assumed you meant it was easy.

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

      Well I thought it deserved more points :p I had both hard time figuring it out and implementing it. I think problem D is super easier than E (I read it after contest)

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

Don't miss square869120Contest #4 on April 9th on atcoder!!!
https://s8pc-4.contest.atcoder.jp/

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

    Is there any reason why you don't make these rounds part of atcoder regular/grand contests?

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      1. This contest's concept is "Enjoyable for every people", so there are many partial points (JOI / IOI — style) for easy or medium-level competitive programmers for avoding "only sitting last 3-hours and can't do anything".
      2. This contest has a marathon / approximate (?) problem in the last problem, so it is not usual for ARC / AGC.
»
8 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I thought it was the most difficult AGC ever. (but with really nice problems)

Maybe it's because I'm so naive

and my rating -= 1

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

Is there anyone who solved B for full points in other way than mentioned in the editorial???

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

    I did (well upsolved, I couldn't participate in the contest). I know your question is pretty old but I thought that you might find the answer useful in some way. I just kept some sort of dp: lst[i][j] = the id of the last operation that affected the node j in such a way that j, at its turn, would affect the nodes at distance i from itself. The recurrence is something like update for each (i, u), lst[i — 1][v] for each v such that v is a neighbour of u with lst[i][u]. You could check out my source for more details: http://agc012.contest.atcoder.jp/submissions/1452611

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

      Thanks I still had not upsolved the question .Editorial was tough for me. I will try to solve with the help of your approach :)

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

Thank you for your participation! We're sorry for score of problem E (we thought this problem was easier than other AGC E).

Could you enjoy my problems? I strongly recommend to try problem F. I think it's REALLY interesting and beautiful problem!!

  • »
    »
    8 лет назад, # ^ |
    Rev. 5   Проголосовать: нравится 0 Проголосовать: не нравится

    Thanks for the very nice problem set. I tried to solve F, understood the part in the editorial saying "there is no (i, j) pair with i < j, and bj < bi < bj + 1", but I am stuck at how to go from there to the dynamic programming solution dp[i][j][k], where i is the number of values filled from the end, j is the number of candidates, and the k-th candidate is chosen. Could someone elaborate on this part ?

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

Can anyone explain why in the editorial of D, we are taking two minimums a1 and a2. Thanks.

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

    It is the critical point that a1's color is different from a2's color.

    Basically, we can use a1 to change the position of balls. However we have to use a2 to change the position of balls which color are the same of a1. We don't need to use the other balls in operation2. Because the other balls' weight are heavyier than a1 and a2.

    Could you got it?

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

    Here is an alternative solution, which also explains that:

    1. For each color, get the minimum value and replace every weight with minimum if min + original_weight <= X (it means that you can replace the balls within the same color).
    2. Sort such pairs (new_weight, color).
    3. Generally you should be able to permute all the balls such that: new_weight_i + min_new_weight <= Y. The rest stays the same. The only exception are such balls where color_i == color_of_min_new_weight, which can't be replaced because sum of their weights > X. The only way to move such a ball is to use the smallest new_weight with a different color. That's why you need second_min_new_weight and if sum of their weights <= Y, you can move such a ball, otherwise it must stay at original position.
    4. You get all movable balls of size n, you count n! and divide it by factorial of the count of the colors included in movable balls set: n!/(k1!k2!..ki!)
»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What's the intuition behind the trick used in the solution to problem C ?

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

    When I started to think this problem, the definition of good string is different from current definition. The condition is like this: x can be represented as yyzz (not yy).

    Under this constraints, it is tough to use a character three times. Thus, I came up with this approach.

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

. Ignore — understood from the image.