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

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

APIO 2016 (Asia-Pacific Informatics Olympiad) will take place in 7-9 may 2016 hosted by Republic of Korea .
official site . competition rules .

Practice session will start at 3 May and end in 5 May .
wish good luck for all participants .
UPD : practice session has been started , Link.
UPD2 : contest has been started and it will end at 8 May 11 GMT. UPD3 : open contest day has been ended

Problems : problem 1 , problem 2, problem 3
UPD4 :Official results
congratulation for all medals winners
first place : yokozuna57 and namonakiaccount
second place : yutaka1999

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

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

Auto comment: topic has been updated by Whistle (previous revision, new revision, compare).

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

Can I participate ? I'm not in Informatics Olympiad

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

Really liked A :)

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

The problems in the practice session are from BOI2014.

http://www.boi2014.lmio.lt/

https://github.com/boi-2014/tasks

gl & hf;

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

30 submission max allowed on each problem, and max one submission in 5 minutes. Isn't that too much? :/

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

Please don't share problems/codes/solutions/scores here or anywhere else until the end of the contest that will make the contest unfair.

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

How much points are needed to get silver?

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

how do you get beyond subtask 2 of fireworks?

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

    Let me guess you got 100+26+100 ?

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

    Subtask 3 (hard one) : the tree dp in ST2 can be expressed in a combination of linear function (like CHT). you should modify it while moving up to parent, and "add" two function in merging step. Details omitted (cause I don't know it too.) for ST4 I think merging from small -> large idea will help.

    Subtask 3 (easy one) : I "guess" (I have no proof) that, in one of the optimal way, the explosion time is one of the depth of leaf node. Now, we can modify the tree dp in ST2. (I need sliding window for this)

    I come up with that "easy one" in last 10 minutes, so I couldn't even submit it. Use this solution at your own risk.

    My score : 100-26-100. (Top in Korea, Dongwook Hwang (Inhibitor) have same score with me too.)

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

      easy one : MY GUESS IS WRONG. countercase :

      2 5
      1 1
      1 299
      1 299
      2 300
      2 300
      2 300
      

      answer is 300 -> 2, while all leaf have 299 / 301 depth. It's even hard to get 255..

      (Thanks gs12117 for informing this!)

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

      The dp procedure is something like Minkowski sums. And after some observation it's possible to maintain all the points where slope of the function changes, simply using std::set (handwrite BST is not necessary), merging from small to large, which gives an O(nlog^2 n) solution. (I wrote this and got 100pts) And it's easy to find that there are only "extract max" operation needed, so if you replace std::set by leftist trees you will get an O(nlogn) solution.

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

      Cool, looks like q2 was actually the hard question. Funny that was the only question I solved.

      My score: 9-100-30

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

    You think in terms of a cost function for each subtree. Then you realize it is always a convex function (have a region of global minimum in the middle, and gradient >= 1 everywhere else). You just propagate this up the tree, and done.

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

      Can you explain what you did in bigger detail ? How did you calculate the cost function efficiently ?

      How do you merge 2 cost functions?

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

        The cost function is the cost of adjusting the subtree such that the path to each leaf is equal.

        We need to support 2 important operations:

        1. Send a cost function up a tree

        2. Merge cost functions of subtrees (that have already been sent up their edge)

        For 2. we can store our cost function as points where the gradient changes (a point for each +1), in a sbbst, along with the initial (at 0) gradient and intercept. Merging them is simply adding the initial gradient and intercept, and merging the bsts, which could be done efficiently using the small merge principle.

        1. involves choosing how much to change the edge we are going up. Notice that as long as we can't change the subtree for free (i.e. move around at the optimum), it is more optimal to change the single edge as much as possible. Let len be the length of the edge, not changing the edge at all would result in the function shifted right by len. However, for everywhere left of the optimum, we will try to use the edge as much as possible, thus it is shifted left and up by len. Everywhere right of the optimum we can increase the edge by however much we want, thus it's always gradient 1. Therefore, the net result is that the optimum is shifted right by len, everything left of the optimum is shifted up by len, and they are connected with gradient 1. In our representation, the net result is simpler: intercept+=len, the two points at the ends of the optimum shifts right by len, and all points after the optimum are deleted.

        By using this algorithm to propagate the function up the tree, we can easily find the optimum at the root.

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

    How to solve 2nd subtask?

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

Did anybody score 100 in fireworks?

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

I scored 9 + 26 + 48.18 :(
What do you think will be the medals limits?

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

when does apio deliver medals?

or do they give medals at all?

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

Примерно с 84 — бронза, с 138 — серебро, с 215 — золото

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

Full solution for subtask 2 P3 :

Step 1 : Find a_1 and a_n

Query(0, 10^{18}) to get the values of a_1 and a_n. This increases M to N + 1.

Now, divide the range [a_1 + 1, a_n — 1] into n — 1 equal blocks. Since there are n — 2 elements in the range but there are n — 1 blocks, at least one block is empty. So, if we let D be the distance for one block, then the answer is > D. So, we know that the answer will not be the difference of two elements in the same block.

Now, we just go from the start (a_1), and query each of the blocks to get its min and max element (if they exist) and update the maximum difference accordingly. Since we do N — 1 queries and there're N — 2 numbers involved in the queries, the total value of M is N + 1 + N — 1 + N — 2 = 3N — 2 < 3N.

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

Where are the unofficial results ?

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

Unofficial Medal Cutoffs :

Bronze : 87

Silver : 138

Gold : 215.04

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

Help debug — https://ideone.com/oOKjFC. For "gap"

It says that it terminated with a nonzero exist code, which means that in one of my inputs, my s is larger than my t, but I don't see this happening...

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

Auto comment: topic has been updated by Whistle (previous revision, new revision, compare).

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

I scored 55 points in fireworks, but it took me too much time.

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

Competition data (tasks, tests, solutions) are uploaded in apio2016.org

You can also find it in Github : https://github.com/apio-2016/apio2016-tasks

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

Why are the unofficial results not published yet?

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

Official Result is available: http://apio2016.org/results/

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

Results are finally out. Yay! http://apio2016.org/results/

Boat has 31 full scorers, Fireworks has 4 full scorers, Gap has 40 full scorers. (Correct me if I counted wrong)

Korean top6 :

Jaehyun Koo (ko_osaga) (100 / 26 / 100)

Dongwook Hwang (Inhibitor) (100 / 26 / 100)

Donghyun Kim (kdh9949) (100 / 26 / 49.72)

Hyunsoo Kim (khsoo01) (31 / 26 / 100)

Sunjay Oh (ggoh) (31 / 26 / 100)

Junseo Koo (31 / 7 / 100)

Also congratulations to Ultimate tonyjjw !

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

I know I'm going to get downvoted to oblivion, but I really think this is unfair. Scoring 80-86.5 is much harder than scoring 87. :(

I know both are bad anyway

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

Did teams from Russia participate in APIO 2016?