aryanc403's blog

By aryanc403, 20 months ago, In English

2013A - Zhan's Blender

Idea

Submission — 282005858

2013B - Battle for Survive

Hint 1
Hint 2
Hint 3

Submission — 282011553

2013C - Password Cracking

Hint 1
Hint 2
Hint 3
Hint 3

Submission — 282024928

2013D - Minimize the Difference

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6

Submission — 282029106

2013E - Prefix GCD

Hint 1
Hint 2
Hint 3
Hint 4

Submission — 282034547

2013F1 - Game in Tree (Easy Version)

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Hint 7

Submission — 282075612

2013F2 - Game in Tree (Hard Version)

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
20 months ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Nobody that I've talked to so far was able to prove the solution for D. Anyone with a proof? I'm eagerly waiting for the editorial because I'm also not able to prove it...

  • »
    »
    20 months ago, hide # ^ |
     
    Vote: I like it +11 Vote: I do not like it

    ignoring the very long paragraph above we are trying to prove that in the optimal answer the min will be the maximum possible min we can achieve , right ?

    • »
      »
      »
      20 months ago, hide # ^ |
       
      Vote: I like it +8 Vote: I do not like it

      Yes, you want to prove that achieving maximum min and minimum max at the same time is possible.

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    This is not an exact proof for D, but an intuition for why it's always possible to get the biggest min when we get the smallest max. If we look at the array as a stack of bricks at each position, then we know that bricks can flow from left to right. Now let's look at these operations as transactions. When we are trying to get the smallest max (let's call it mx), we want all the elements that have value greater than mx to sell their bricks to someone. And since mx is the smallest max value, this will generate the highest supply of bricks than any other (bigger) max value. Similarly, for getting the biggest min value (calling it mn), we want to get bricks to all the positions that have bricks less than mn. And since mn is the biggest min value, this will create the maximum demand for bricks. Hence it only makes sense that the highest demand and the highest supply can't only coexist simultaneously but actually beneficial for each other since when people want to sell the most bricks, there are the most buyers.

    Hope this makes some sense XD