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

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

Topcoder SRM 743 is scheduled to start at 12:00 UTC -5, December 9, 2018. Registration begins 24 hours before the match and closes 5 minutes before the match begins.

Problem Writer: boba5551

This is the second SRM of Stage 2 of TCO19 Algorithm.

Stage 2 TCO19 Points Leaderboard | Topcoder Java Applet | Next SRM 744 — December 14

Hope to see most of you competing! All the best!

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

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

tourist already passed to finals. How his results counts in other stages? And what's wrong with sorting by total points?

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

The google event link to the SRM 744 shows the date is on Jan 2019. I assume this is a mistake, could you fix it?

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

How to solve Div 1 300?

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

Thanks a lot for the round!

Today's challenge phase reminded me: do the SRMs still use the biased room assignment algorithm (https://codeforces.me/blog/entry/57870?#comment-416132)? Given that all SRMs are part of TCO now, maybe they should switch to the fully random one?

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

What was the idea for Div 1 500?

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

    As I see it, the idea is to carefully choose the algorithm with which the largest sum will be computed. It is more or less evident that you will need to compute the probability distribution of the maximal achievable sum and the question is how to do it without introducing conditional probabilities along the way. For example, if you use partial sums, every flip of a coin influences a suffix of the array of partial sums. Therefore, assigning one variable per partial sum does not work (at least not in the straightforward way) because the variables start depending on each other and the computation even of their distributions becomes complicated, let alone of the distributions of more complicated variables such as max(s[r]) - min(s[l]), l ≤ r. Assigning a variable to every segment does not work for the same reason.

    Here is what works instead. Start with the first number and add the numbers greedily while the sum stays nonnegative. If it ever becomes negative, remember the largest sum and discard all the numbers you have seen so far. Repeat until the array is empty. After processing several numbers (and before consuming the number whose turn it is now) all you have to keep track of is the sum of the not yet discarded part and the current maximal sum.

    In the randomized version you can now assign a variable to each of these numbers... only to obtain nonindependent variables again. Luckily, this time there are only two of them regardless of the size of the initial array, so you can keep track of their joint probability distribution. Let p[i][s][m] be the probability that after the execution of our algorithm on the first i numbers the current sum is s and the maximal sum we have seen is m. Flipping a coin to set the sign of the number i we can compute p[i + 1][s'][m'] for all possible s' and m'. To be more precise, for an array of size n you now have 2·(n + 1) variables Si, Mi and the joint distribution of (Si + 1, Mi + 1) depends only on the joint distribution of (Si, Mi) and the probability of writing a minus before the number i. This allows you to compute the joint distribution of (Sn, Mn) from which you can extract the distribution of Mn that you have been seeking all along.