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

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

We will hold AtCoder Regular Contest 117.

The point values will be 200-400-600-600-900-900.

We are looking forward to your participation!

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

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

Setter should have swapped C and D.

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

Was the problem C inspired by this?

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

I didn't get the idea provided in the editorial for problem C !! Can somebody explain in a more detailed way?

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

How to solve D? I thought that starting traversal from leaf node is enough.

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

Problem C is the typical “have you seen this trick before?” or “can you search this at google” type of problem. Or did people manage to deduce the solution by themselves? I am glad to get to know this problem though

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

    You should know about pascals triangle and binomial coefficients at least. Then It is plausible.

    Well, I didn't know the idea and was thinking for quite some long time about C. I also assigned 0,1,2 to the colors. I tried to find a relation for the resulting block on two other blocks. Like I tried $$$c=a+b$$$, $$$a=a*b$$$, $$$c=k*(a+b)+j*a*b$$$ and so on... I also tried writing the numbers as vectors (1,0,0), (0,1,0) and (0,0,1) and try combine them with the crossproduct (spoiler: it didn't work out, since $$$a \times a = (0,0,0)$$$).

    Then I wrote down a 3x3 table with all combinations and analysed simple addition again, and then noticed that you only have to swap the twos and ones, so $$$c=-(a+b)$$$. Knowing Pascals Triangle the solution then seemed obvious. I just had no idea how to calculate all binomial coefficients for $$$n$$$ efficiently and then there was no more time left.

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

    I solved it myself though 10 min after contest my solution got AC. I think if you try to find some valid function to deal with string, it becomes solvable.

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

    We intuitively want to reduce both cases to one case, and blue+white+red = blue+blue+blue if blue = -(white+red).

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

      Do you mean blue+(white+red)? I assume blue+white+red would be $$$(b+w)+r=r+r=r$$$?

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

        blue = -(white+red), note the minus sign!

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

          I just wanted to emphasize that the associative property is not given.

          I totally agree on $$$blue = -(white+red)$$$. I disagree on $$$blue+white+red = blue+blue+blue$$$ though.

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

            Oh right. Yeah, I missed things, I guess it was too intuitive for me. Since we want 3*blue = 3*white = 3*red, that hints at modulo 3, then it's = 0, and then -blue = 2*blue = white+red.

            We demand associativity because we lose nothing by trying to find an operator + that's associative first and trying other things later. Since we found a solution with this requirement (namely regular operator + modulo 3), everything's fine on that front.

            This isn't the only possible idea (obviously, since bruteforce exists), but it's a pretty common approach to solving problems to try several increasingly more complex / uglier ideas.

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

Very good contest!! I think the problems are very fascinating and the time is friendly to Chinese participants.

However I didn't solve B very quickly and I think D is easier than C.

It's hard to come up with the construction without watching that video

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

Hi could anyone give a hint about the O(n log A) approach to problem F? Read many accepted codes but still have no idea about how it works.

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

Um.. I think the editorial is wrong on Problem F. Additionally, the larger s_N is, the smaller s_N - s_{N-1} will be. I believe the truth is the larger s_N is, the large s_N — s_{N-1} will be.

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

I still do not get how in the editorial of e, when there are 4 2's in third col, how the number of ways of choosing two of them is 4, when 4c2 is 6.

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

Great contest. I was just wondering about the Bonus part given in Problem D's editorial where the authors have asked to implement a checker code in $$$O(n\log n)$$$ time. Does anyone have any idea how this might be done? Thanks!