Zlobober's blog

By Zlobober, 3 weeks ago, translation, In English,

Hi everybody,

Less than in 30 minutes there will start a second round of IOI 2017. Yesterday all the students visited the sixth talles tower in the world named Milad Tower.

We wish all the contestants the good luck!

Some useful links (more to be added):

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

»
3 weeks ago, # |
  Vote: I like it +20 Vote: I do not like it

When will they start? And when will mirror start?

  • »
    »
    3 weeks ago, # ^ |
    Rev. 4   Vote: I like it +13 Vote: I do not like it

    They have started 8 minutes ago. Don't know much about the mirror, isn't it 1 hour after the competition start?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The mirror contest is now available at Yandex.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Early statements, please :D

»
3 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it
  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +124 Vote: I do not like it

    Breathe deeply, be strong, wait for mirror, be strong...

»
3 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it

Here you can see the problems and their translations.

»
3 weeks ago, # |
  Vote: I like it -6 Vote: I do not like it

Another ranklist here

»
3 weeks ago, # |
Rev. 3   Vote: I like it -41 Vote: I do not like it

Deleted

»
3 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

The scoring scheme for Prize is terrible.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +29 Vote: I do not like it

    Yesterday I also realized that the distribution of this problem is not good (only 20, 90-100 assuming most people got subtask 1, which is relatively easy). During the yesterday's GA meeting, I raised a minor objection about this. However, the answer from the ISC is satisfying (believe me), so now I am agree with the scoring :)

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +31 Vote: I do not like it

      My opinion is that the curve should be similar regardless of difficulty. Now contestants who happens to suddenly don't know how to do / have bugs are severely punished. Now it seems that the whole IOI (bronze) will be decided by this 70 points.

      Just my own opinion though.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +43 Vote: I do not like it

      Can we ask what was the answer?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -7 Vote: I do not like it

    Do you have any ideas about that problem?

»
3 weeks ago, # |
Rev. 2   Vote: I like it +74 Vote: I do not like it

Thanks to msg555, the farming edition is up and running again!

(warning: it has sound)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    lol I quickly found out all other teams, but wondered which team is the hydralisk

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +16 Vote: I do not like it

      copied from his source code

      var team_image_map = {
        "KOR": "hydralisk.png",
        "CAN": "moose.png",
        "AUS": "roo.png",
        "NZL": "kiwi.png",
        "GBR": "guard.png",
        "RUS": "hedge.png"
      };
      
»
3 weeks ago, # |
Rev. 3   Vote: I like it +15 Vote: I do not like it

jerry's struggle for that 100 in The Big Prize tho lol

edit:

»
3 weeks ago, # |
  Vote: I like it +177 Vote: I do not like it

yutaka1999! Go for the winner!

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +265 Vote: I do not like it

    MASSIVE CONGRATULATIONS yutaka1999!! Winning both IMO and IOI , impressive... Is he second person in history to achieve this, after Reid Barton as far as I remember?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +43 Vote: I do not like it

      I wondered if he would like to share how he accomplished such an impressive achievement.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it +108 Vote: I do not like it

        "Hello sir, how to become red in one year? Looking forward to you answer, best wishes."

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +108 Vote: I do not like it

    Congratulations, nice double win!

    Let's go to major international tournaments together next year and compete for the titles :)

»
3 weeks ago, # |
  Vote: I like it +39 Vote: I do not like it

They just announced on the stream that the contest has been extended by 15 minutes because of technical issues, so there's 23 minutes to go!

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks for info!

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Now they're saying "by at least 15 minutes, maybe longer".

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      To summarize what was told on the stream, the judging system still doesn't seem to work well, there's a big queue and it's not clear when the contest will end. So far it seems that it has been extended by 15 more minutes, for total duration of 5:30.

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

rpeng just announced on the stream that 15 minutes more have been added.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Did they give any reasons for the extension?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      He briefly mentioned that there was a large queue and that feedback took more than five minutes.

»
3 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Is time on submission indicate the "time of judge" rather than "time of submit?"

And I'm nearly getting heart attack for every time extend..

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

According to the current state of the contest hall, contest is extended by 30 minutes (in total).

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    Are the contestants able to submit solutions in the extended time? (I hear Achilles chasing a turtle...)

»
3 weeks ago, # |
Rev. 2   Vote: I like it +24 Vote: I do not like it

What did you do to Iran's team LiTi? No gold?

Update : It's still changing. One gold by now.

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

No changing in the scoreboard
We have to wait untill the closing ceremony to find out the results ?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

If I am not mistaken, ioi never prolonged contest, especially cuz of queue and testing system. Do they have serious reason to do this?

»
3 weeks ago, # |
  Vote: I like it +18 Vote: I do not like it

Seems to be over now, judging by the stream.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Thanks god
    I almost thought they are going to make day 3

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The scoreboard hasn't changed yet.

    Do we have to wait until the closing ceremony to see the results?

»
3 weeks ago, # |
  Vote: I like it +18 Vote: I do not like it

OK, so that will be some fair amount of work :P. I am really surprised by some similarity of this problem to ... some other problem :P (details in spoiler)

Simurgh solution
»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Could some provide some hints about Prize problem?

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    1) There's a lot of least valuable boxes and just a few of more valuable ones
    2) Try determining at least one
    3) If we have two of them, how can we tell whether there is more valuable one between them? How to use this fact to look for more valuable boxes?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Do you have a deterministic way of finding the least valuable box? After ~50 random shots there's almost no way you don't hit at least one, but it is still possible.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I've tried first min(n, 500) boxes at the beginning: 4502 > 200 000, so we will find at least one least valuable box.

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it +8 Vote: I do not like it

          In order to make my number of queries lower I noted that if sum of two values returned by checker is at least 22 then it is least valuable, because (222)2 > 200000. That allows me to ask about only 23 boxes.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Yes, I have. Note that checker is adaptive, so in fact it is possible that if checker is evil you will not find any even after 50 shots.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Remember that the grader is adaptive so it can give you 50 valuable boxes just to piss you off ;)

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        In the first 500 there must be a least valuable box. If there were 500 other boxes, then from the least but one valuable box there would be like 470, and 470^2 > 2*10^5.

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
          Rev. 2   Vote: I like it 0 Vote: I do not like it

          Whoops I made this error. At my initial code I checked only 450 boxes to find the minimal, as 450^2 > 2*10^5, but I forgot that this is not necessarily the only layer.

          1, 2, 5, 26, 440, 199526 requires 473.

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            26^2 > 440

            1 4 21 446 198917 requiers 472 and there can't be more (i believe simple cases will provide you with the proof)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Simple solution for 90 points.

    It's easy to see that at most 500 items are non-lollipops. So query the first min(n, 500) items to find at least one lollipop (this is the one with largest answer sum).

    Then to locate all the non-lollipop boxes we could binary search prefixes; it takes at most 500*log_2(200K) ~ 8.5K. (you could save a bit, not sure how many by memoizing queries)

    Afterwards just search each of the non-lollipop one by one for the diamond (there's at most 500 of them); the diamond is the one with both 0 result.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      This solution with memorizing was enough for me to get 100 points.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

    to reduce queries from to , divide the array into blocks and then binary search just within each block.

  • »
    »
    3 weeks ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it
    My approach for 9X marks
    My approach for 100 marks
»
3 weeks ago, # |
  Vote: I like it +63 Vote: I do not like it

Congrats to 高谷悠太(たかや ゆうた) who came first in both IOI2017 and IMO2017!

»
3 weeks ago, # |
  Vote: I like it +91 Vote: I do not like it

Would like to hear what contestants like matthew99 and reyna thought of the contest. I think everyone is surprised about their result.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +362 Vote: I do not like it

    sad as fuck. how else can i feel

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +38 Vote: I do not like it

    Give them a break, man.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +129 Vote: I do not like it

    Hi, i was kinda frustrated, now i'm much better (i gotta thank everyone for their consolations, my family, friends, people of cf and a lot more, thank you everyone)
    About the problems, i liked them, but they were too hard for me to solve, there were a lot of strong participants that managed to solve them, congrats (especially yutaka1999 for that impressive win, both on IMO and IOI)
    I enjoyed this wonderful event, despite how i performed, hope everyone else enjoys it aswell

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

The second time extension was like 50 seconds before the extended end time... Please don't do that again...

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Wow amazing grind Pedrohso ,from nothing to gold!

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it +21 Vote: I do not like it

    Pedrohso is an incredibly talented guy. I feel very proud by having taught him a few classes a while ago, and I'm happy he could overcome his past coding limitations and was able to fully showcase his problem solving skills. We Brazilians are all very excited about this result, which hopefully will get official soon! :D

»
3 weeks ago, # |
  Vote: I like it -22 Vote: I do not like it

Italia again... called it.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -37 Vote: I do not like it

    ???: Hi , so to me seems like a notorious coincidence.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What are the chances of 144.99 reaching bronze cutoff?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Decent. Usually cutoffs are 1:2:3:6, there are more than 300 participants, and 150th has something like 135 as far as I remember

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I believe it should be bronze. Half of the participants get medals and 144.99 seems to be in the first half.

    P.S.

    Though, it seems like the current standings are not the final standings for some odd reason.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +38 Vote: I do not like it

      At this point, I haven't even got the confirmation that day 1 results are final, and I have suspicions that they might not be, which is why I did not publish even preliminary results to the statistics.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Bronze right now is at 135.76 points; do you think appeals would change it significantly?

»
3 weeks ago, # |
  Vote: I like it +111 Vote: I do not like it

Wow astonished at the result renewed. I would never believe 1, 4, 5-th place would be occupied by Japanese guys.

»
3 weeks ago, # |
Rev. 3   Vote: I like it +124 Vote: I do not like it

5:29:57....

Uhh, maroon_kuri, how do you submit twice in the last minute of the contest (when the judge is too slow to get feedback) and manage to have exactly one of the solutions work?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Well, he is a tourist of last minute. He also raised score in last few seconds at some day of JOI Spring Camp :)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +39 Vote: I do not like it

    You don't have to wait for the judge to finish to resubmit. Also, in the last 15 minutes, submissions have no minimum interval. So submitting twice in the last minute is very normal...

    I was lucky enough to sit next to him this year. He told me after the contest that he submitted in the last few seconds for Q5. He was very happy to find out 3 hours later during analysis time that he received 100 points :)

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      Sure, submitting twice is normal. I want to know if he was making random changes and submitting or if he miraculously found a bug in the last few seconds, debugged instantly and squeezed in a correct submission three seconds before the contest ended?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it +21 Vote: I do not like it

        Ah, yes — he told me he found very small bug which he fixed within the last minute. Very impressive.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    He said that in last minute he found some optimization and got 100. He didn't know that result until the analysis, since the scoreboard was broken.

»
3 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

for Books , does anyone have a testcase where the logic for S = 0 fails with S > 0?

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it +20 Vote: I do not like it

    Lol. Care to elaborate what you mean, just a suggestion :)? There are a lot of ways you can think about this problem and there are a lot things you can simply don't care about if S=0. Don't expect us to know what you mean by "logic for S=0"

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      first of all i add count of (j <= i && p[j] > i) + (j > i && p[j] <= i) to the answer for all 0 <= i < n-1 (just the number of crossing from i to i + 1 and i + 1 to i)

      Then if the permutation isn't connected like this
      . . _______ . s . . __________ . . .
      I also add those "Gaps" in the middle to the answer , however this seems to fail for s > 0.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
        Rev. 2   Vote: I like it +20 Vote: I do not like it

        To clarify, how will you handle the case where the permutation covers s but s is not a part of it, i.e. s is a fixed point?

        For example,

        3 1
        2 1 0
        
        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          thanks , got my mistake.

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
            Rev. 4   Vote: I like it 0 Vote: I do not like it

            How to make it from 70 points to 100 points?

            EDIT:

            When S=0 I know a O(n) solution what merges cycles. Otherwise, I can't imagine how to count the amount of walking from starting point to largest cycle covering it. I have a dijkstra solution what works in O(n^2) because I need to check if i can travel from one cycle to another...

            EDIT: Maybe we need to do the dijkstra from the other side? :D

            EDIT: I keep getting WA on testcase 5 :D Somehow testcase 4 works fine :s

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it +21 Vote: I do not like it

    My first solution outputs 4 instead of 6 for this case.

    3 1
    2 1 0
    
    more strong cases
»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone show an example code for the "Prize" task? I didn't understand how to interact with the system

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +5 Vote: I do not like it
    90 pts clean code
    100 pts ugly code
»
3 weeks ago, # |
  Vote: I like it +38 Vote: I do not like it

Congrats reality on g̶e̶t̶t̶i̶n̶g̶ ̶a̶ ̶s̶i̶l̶v̶e̶r̶ ̶m̶e̶d̶a̶l̶ defeating Rudy69.

»
3 weeks ago, # |
Rev. 2   Vote: I like it -6 Vote: I do not like it
»
3 weeks ago, # |
  Vote: I like it +32 Vote: I do not like it

How to lost your medal: Solve problem Prize under the impression that the checker is not adaptive, random 5 times instead of 500 times, spent 3 hours trying to optimize the binary search part without realizing that the checker is adaptive. Profit.

  • »
    »
    3 weeks ago, # ^ |
    Rev. 3   Vote: I like it -8 Vote: I do not like it

    I did the same fucking thing and didn't get time to do ~30 points subtasks for silver. :(

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Here is another example. I had Prize coded hour and a half in the contest, and it was correct with one tiny error: my bs was while l < r instead of l <= r, and I spent 3,5 next hours debugging it. I found my error literally minute until the end of the contest, fixed it, submitted, and then I realised I have commented a part of my code, for some kind of debugging. I deleted the comment, alt tabbed to the cms, but it was too late. In the analysis, that solution was accepted, without any changes. :(

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +18 Vote: I do not like it

      Oh God, these stories are scarier than any creepypasta.

»
3 weeks ago, # |
  Vote: I like it -30 Vote: I do not like it

When looking on the submission for Simurgh by 9-th placed Lukas Michel, we can observe, that he first solved subtasks 1-3 and in the very last submission only subtask 4. (Probably some other such submissions can be found)

Sure enough, in the rules we can read The score for each task will be sum of scores for its subtasks.

What is the reasoning behind such scoring? Sure, it benefits the participants. But, essentially, participants might produce multiple partial solutions, instead of one that solves all subtasks. What are your thoughts, community?

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it +10 Vote: I do not like it

    It saves you the time and trouble of figuring out what subtask it is in your code. That's not what is being tested in IOI.

    Also, this is the same rule as last year...

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +33 Vote: I do not like it

    But, essentially, participants might produce multiple partial solutions, instead of one that solves all subtasks.

    This has always been the case. For most problems and sets of subtasks, you can write a solution of the form

    if input_looks_like_subtask_1():
      return brute_force()
    elif input_looks_like_subtask_2():
      return solve_special_case()
    else:
      solution_1 = apply_heuristic_that_doesnt_always_work()
      solution_2 = apply_another_heuristic()
      return whichever_looks_more_reasonable(solution_1, solution_2)
    

    ...and this is indeed what participants did, and indeed more or less what the jury expected them to do.

    It's totally okay for participants to write partial solutions — indeed that is exactly what the entire concept of subtasks is for. Often it makes no sense to try to write a single solution that solves multiple subtasks: a reasonable IOI participant who cannot solve some problem completely might be able to solve subtask 1 with a bruteforce, and subtasks 2 and 3 might happen to be different special cases that can each be solved with a different special case solution. Requiring this participant to combine all three in a single file is just a waste of their time.

    Thus the introduction of the "sum of scores of subtasks" rule doesn't really change anything about the spirit of the competition, but it does fix some awkward things that might happen without it, especially when feedback is broken (and I remember more recent IOIs where feedback was broken at some point than IOIs where it never was). Here's an anecdote that hits close to home: our own OVR in 2012 submitted a solution to some problem that solved subtasks A, B, C. Then feedback was broken (and never got fixed before the end of the contest), and OVR submitted another solution, which happened to solve A, B, D, but broke on C for some reason. Because of the broken feedback, he never learned about this until after the end of the context. (score(ABCD) — max(score(ABC), score(ABD))) would've been enough points to move him from bronze to silver, and the team wrote an appeal arguing that, if feedback was working as intended, he'd have noticed this and just submitted a "merged" solution that invokes his old one when ran on tests from subtask C. The appeal was almost granted, until someone from the jury noticed that the second submission was made less than a minute before the end of the competition, which meant it was quite unlikely he'd have managed to do the merging in time, so the appear was eventually denied. Had the new rule been in place back in 2012, Latvia would've had one more silver medal :)

»
3 weeks ago, # |
  Vote: I like it +40 Vote: I do not like it

IOI 2017 Preliminary Results. These are not the final results until GA approves them and as such may change.

After discussion within the IC, the rank of the offsite contestant is defined as the highest rank amongst all onsite contestants with the same or smaller score.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Does anyone know why my solution fails in tests 65, 68-72, 74 on books?