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

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

We will hold AtCoder Beginner Contest 314.

The point values will be 100-200-300-400-475-475-575-625.

We are looking forward to your participation!

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

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

Can anyone tell me what is "Clar" in "About the New Judge"? I hardly found posts about it in Bing.

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

AtCoder Beginner Contest Pi!

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

Wow! New judge!

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

omg , my java codes are working in 40ms , but why did you removed java 8 , it's the best version of the best language on this earth

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

Good contest I was pretty scared that they mentioned it will be harder than usual but I didn't felt this contest is way too different compared to typical atcoder rounds

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

too funny :) I submitted 4 wrong codes on D, such a easy problem.

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

Whyyyyyyyyy both E and F are expected value based question. Guess its time to practice expected value :(

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

Pretty shocked to see that people are discussing ongoing contest in the comment box , some even telling solutions

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

how to solve E?

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

orz chromate00 for the first solve of Ex...

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

How to Solve D?

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

Using simulated annealing and passed task Ex, maybe the data is too weak?

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

Weak tests in D.
https://atcoder.jp/contests/abc314/submissions/44532834 should fail on 7 Atcoder 3 2 0 a 1 3 a 1 3 B

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

Can anyone talk more about problem E? I can hardly understand the editorial. Thank you so much.

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

    I'm not sure if it would help but I'm writing my way of thought anyways. Keep in mind that it is not really formal, I suggest your refer to the editorial for more formality.

    Let $$$E_i$$$ be the expected number of money needed to get $$$i$$$ points when Takahashi adopts the optimal strategy.

    At first Takahashi has $$$0$$$ points. So there are $$$M$$$ points he needs (at least), so the expected number of money needed is $$$E_M$$$. What's left is to compute $$$E$$$.

    Say Takahashi has $$$0$$$ points (i.e needs $$$M$$$ points). At that point and based on his strategy he will choose some $$$k\in\{1, \dots , N\}$$$ and spin the $$$k$$$-th wheel. Doing that, he will pay $$$C_k$$$ (for sure) and will gain $$$S_{k_j}$$$ points ($$$1\leq j\leq P_k$$$) with probability $$$\frac{1}{P_k}$$$. Then he would have $$$S_{k_j}$$$ points, so he will need $$$M - S_{k_j}$$$ more points. That implies that he will then need an average of $$$E_{M - S_{k_j}}$$$ money. So the expected number of money when having $$$0$$$ points ($$$M$$$ points remaining) is

    $$$\displaystyle E_M = C_k + \sum_{j=1}^{P_k} \frac{1}{P_k} E_{M - S_{k_j}}\quad (1)$$$

    (keep in mind that $$$E_i = 0$$$ for $$$i \leq 0$$$, but you can just have $$$E_0=0$$$ and always take the index $$$i$$$ as $$$\max\{0, i\}$$$)

    $$$ $$$
    What about zero elements?
    $$$ $$$
    How replacing the costs makes for an easier solution.
    $$$ $$$
    But how can we know k?

    Similarly to $$$E_M$$$ we can compute all of $$$E$$$. This yields a $$$O(MNP)$$$ solution ($$$P=\max_i P_i$$$), which is basically the editorial's solution looking at it slightly differently. I think understanding one solution will make one easily understand the other.

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

      (The problem is resolved, so kindly ignore this message.)

      Hello judgme_nt,

      I used the exact approach suggested by you. But my code is giving WA on just 1 test case. I can't find the error in my code. I coded a recursive solution and can't find anyone with a similar code. Can you please point out the mistake in my code?

      Submission

      Here, I have used a "cnt" array to store the number of zero elements in i-th wheel. (The code is written clearly enough, so understanding it would not be tough).

      Thank You

      UPD: It got accepted when I changed double to long double.

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

      It is much easier to understand than Editorial.

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

New judge seems much faster?