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

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

We will hold AtCoder Beginner Contest 272.

The point values will be 100-200-300-400-500-500-600-600.

We are looking forward to your participation!

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

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

my favourite

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

How to solve task E?

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

Actually I don't think problem F fits for its position, it would be better to swap it with G indeed.

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

I tried using BFS in Problem D, but I am not able to pass the 3 tests. Can someone help me find the issue? https://atcoder.jp/contests/abc272/submissions/35485981

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

On problem D, I think it will be possible to solve the problem in $$$O(N^2+\sqrt{M})$$$ by precalculating the possible movements. (I did it in $$$O(N^2+(\sqrt{M})^2)=O(N^2+M)$$$ through a brute-force precalculation.) Did anyone solve D with this method also?

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

I used the SA-IS algorithm in problem F but failed. I thought my idea was genius but the jury thought I was an idiot. Would you please review it?

Submission(272F)

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

I think problem E is very nice for "learning how to analyze complexity". In fact during contest, I could not convince myself that the complexity is O(NlogN) rather than O(NM), but after reading the editorial, I really like the idea of "important values".

Besides, problem F is somehow about suffix array, which is really really a difficult topic for me, not even to talk about that clever construction in editorial. It seems that I should find time to learn suffix array again.

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

Can anyone explain how hashing solution works for F?

I am not able to think how to compare strings lexicographically using it

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

Can someone explain for problem $$$G$$$ why we need to check only $$$log_{3/4}(1-L)$$$ times randomly according to the editorial?

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

    Let $$$ P(success) = L $$$

    $$$ P(failure) = 1-L $$$

    $$$ P(failureInOneRound) = 1-\frac{1}{4} = \frac{3}{4}$$$

    We fail only if we fail on all steps. Let the number of steps be x, then

    $$$ P(failure) = P(failureInOneRound)^x = (\frac{3}{4})^x$$$

    On equating P(failure) you'll get the desired value of $$$ x = \log_\frac{3}{4}(1-L) $$$

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

      Its probably a dumb question but how is $$$P(success) = 1/4$$$. I mean they said it in the editorial but how did they arrive at this conclusion?

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

        S = Subset of array which will be in answer. |S| $$$ \geq \lfloor \frac{n}{2} \rfloor + 1 $$$. For getting correct answer we want that both values which are chosen must belong to S. Its probability, p = $$$ \frac{|S|*(|S|-1)}{n*(n-1)} $$$.

        $$$ |S|*(|S|-1) \geq (\lfloor \frac{n}{2} \rfloor+1)*(\lfloor \frac{n}{2} \rfloor) \geq (\frac{n}{2})^2-(0.5)^2$$$ (-0.5 term will come when n is odd) $$$ \geq \frac{n^2-1}{4} \geq \frac{n^2-n}{4}$$$

        Substituting in p, we get p $$$ \geq \frac{1}{4} $$$