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

Автор chrome, 12 лет назад, По-русски

Всем привет!

Завтра в 14:00 MSK состоится Topcoder SRM 653.

Предлагаю обсудить задачи после контеста.

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

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

without you chrome I would miss participating all the SRMs, thanks :D

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

Would it be rated ? :P

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

450-Div1 seems to be similar to SPOJ_MOBIVINA

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

I'm wondering if there's a test case for 250 d1 in which the number of possible layouts is equal to 1 modulo 2^32, but not equal to 1. If there is, then many contestants will fail because of overflow :)

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

How to solve Div2 1000?

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

How to solve 450 and 900 ? Thanks.

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

    450 hint: min cut

    900 hint: look at matrix with 0, 1, 2 as rows (Bob's) and R, P, S as columns (Alice's) and what happens if 0 was Rock, 1 was Paper, but now 0 is Paper and 1 is Rock

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

    450 is mincut (which is equal to maxflow, as you need only value of cut, not cut itself).

    For every value X, add edge with capacity 0 from S to X, if X can be assigned to Bob, or edge with capacity INF, if it can't.

    For every value X, add edge with capacity 0 frot X to T, if X can be assigned to Alice, or edge with capacity INF, if it can't.

    For every pair of values X, Y, add edge between X and Y with capacity C, where C is penalty for assigning X and Y to different players.

    Now you need to find mincut between S and T in given graph. You'll assign all vertices in same component with S to Alice, and all other vertices to Bob.

    P.S. I can't understand why they gave this problem, it is pretty standard task, reduction to maxflow is well-known, and lot of users are using prewritten implementation of maxflow, therefore main part of solution can be done with copy-paste very fast.

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

    You can see the editorial for div1 900 here. (spoiler alert!)

    Please tell if something is unclear. :)

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

How to solve div2 1000? UPD: Ignore it... I forced my lazy brain to understand from someone's code and I did.

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

    I use DP like this.

    Let dp[i][j][k] be the minimum difficulty of the first i pitch, where pitch from i — j + 1 to i are given to Alice if k = 0, to Bob if k = 1.

    Then with dp[i][j][k] we can update to dp[i + 1][j + 1][k] and dp[i + 1][1][1 — k].

    The answer is min(dp[n][j][0], dp[n][j][1])

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

As I_love_Tanya_Romanova said, there were no tests such that number of ways to obtain a correct division was 1 mod 232, but even though many contestants failed 250 problem (about a half in my room for example). Did anyone investigated the reason? Were there some other tricky testcases or a deceptively looking "solution"?