Errichto's blog

By Errichto, 4 weeks ago, In English,

Hi.

On Wednesday at 9:05 CET / 8:05 UCT you can participate in the GYM version of the finals of 2017-2018 Russian Olympiad in Informatics (ROI), Day 1. And on Thursday there will be day 2, same time.

5 hours, 4 problems, IOI-style scoring with subtasks. Statements will be available in three languages: English, Russian, Polish.

We wanted to use those problems in a camp in Warsaw so we had to import the problems to some system anyway. Then why not Polygon+Codeforces and thus allowing everybody to participate? Huge thanks to MikeMirzayanov for helping me with using GYM.

I will post a very short editorial in English here, after the contest.

Extraction of radium
Innophone
Quantum teleportation
Viruses

Second day tomorrow, same time.

Thank you for participation.

Editorials of the day 2 are coming tomorrow. For now, some notes about the hardest problem, 102154A - Сложение без переносов:

Addition without carry
Decryption
Quick sort
 
 
 
 
  • Vote: I like it  
  • +374
  • Vote: I do not like it  

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

Wow, thank you very much! So you had translated those problems for the camp?

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

    I translated from Russian to English, and then a few other guys did from English to Polish.

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

      So, do you know Russian or just used google translate? If you know Russian, it looks like you would be eligible to participate in old versions of vk cup :) (But they may change rules)

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

        So let's hope they raise the age limit.

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

        I tried that in the first (I think) version of VK Cup, I was told "nope".

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

5hours and 4problems!

How hard the problem could be...

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

Can I ask why it is just a gym? Why didn't you do something like Codeforces Round #545 (Div. 2), some rating round?

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

    Probably because there are some people who already know the problems and their solutions

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

    The best preparation for an olympiad are problems from olympiads. Similar topics, same scoring format (subtasks). And people solve problems from CF anyway, like Junakson said.

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

Small mistake in Russian name of the contest

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

    :D Sorry, the Russian name doesn't appear at all in the English interface of editing the contest. It's ok now. (The name was "Russian name".)

»
4 weeks ago, # |
Rev. 2   Vote: I like it -8 Vote: I do not like it

Nowadays cf rounds are happening consecutively .

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

Day 1 starts in 10 minutes. Good luck!

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

Can you extend registration?

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

    You can register at any moment of the contest.

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

Can we get the actual verdict?

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

    I can change if for tomorrow to "complete" feedback whatever that means (does it show a test for which a solution fails?). Also, maybe it would be better to show the current leaderboard? I'm not sure.

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

      I think the leaderboard should stay hidden. But that verdicts are really annoying — I don't know if it's TLE or WA. Anyway, it's not a strict problem.

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

        Not showing TLE/WA on big subgroups is feature intended by problemsetters of original contest, not a bug. When you can submit without restrictions and penalties, many participants starts staring to submit a lot of different trashy hacks, instead of solving problems.

        So, showing detailed reports on small subtasks, and binary report got score/not got score on big gives you quite a lot of information (most wa's will happen on small subtasks), while not inspiring incorrect and unproven hacks like "oh, lets check first 1000 possibilities, not all".

        Side effect of this solution, is increasing cost of some kinds of errors like integer overflows or out of bounds, but we consider it reasonable. Anyway, if you are testing large timelimit, you probably should generate big test locally, and will see if it crashes or returning negative answers. If you do not, and just submitting random constants for testing — that is not behavior I want to inspire. Hardness of such tests is one more think which considered when desiding which result showing should be used.

        Everything above should be threat as my personal opinion, not a official position of Olympiad jury. But I think reasoning of others are more or less same.

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

          As I said before, that's not a big deal. The only think made me to ask this question was IOI rules thing.

          And thanks for a detailed answer. I agree with your opinions.

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

      Not showing proper verdict costed me not-getting-a-AC.

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

        Someone can also say "not showing the editorial before a contest costed be not-getting-AC" ;p

        But yeah, it's better to show the verdict if IOI does it.

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

I solved B with $$$O(N \sqrt{N})$$$ Time, but it turns out to be not enough for getting 100 pts (I submitted with various constants, but 84 was maximum)..

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

In the problems 3, how can we prove that it is always optimal to jump to some nodes(i,j) from the node(x,y) that satisfied x<=i and y<=j, which means we don't have to concern about jumping to a node (i,j) where either i<x or j<y (or both) is satisfied. This claim is intuitively correct, but I couldn't get the exact proof.

By the way, thank you for preparing such a nice problem set.

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

    It isn't true. You must consider all four directions (plus going to the next/previous cell in the same row/column). The lemma is: if you go from $$$(i, j)$$$ to $$$(i2, j2)$$$ such that $$$i < i2$$$ and $$$j < j2$$$, then it's enough to consider going to the closest such $$$(i2, j2)$$$ (to one of those tied at the minimum distance).

    Yeah, problems are nice. Kudos to the organizers of ROI. I will list them tomorrow in the blog, when I have time.

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

      If we have multiple processors having the same minimum distant from the current processor, do we only need to link to any one of them, or we have to consider all?

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

        All. Have you read the editorial in the blog?

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

          Yes, but I am kind of confused about the detail of the L-shape thing. Could you please explain a bit more?

          My questions:

          1. why is it an L-shape? for finding these processors have the same shortest distant I think it should be a diagonal or so.

          2. what do we store and how do we find the vertices in L-shape?

          Thanks a lot!

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

            There is a drawing in the editorial. Each cell in the L-shape has the same distance to the current cell $$$(i, j)$$$.

            If you want to find cells in such a shape, you can use sets of positions for each row and for each column. Or just iterate linearly over all $$$k$$$ cells and check which are in the shape.

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

              Oh I see, I made a mistake.

              I transferred Chebyshev distance to Manhattan Distance, And all I am thinking is with Manhattan Distance. Sorry for that.

              Got it, thanks!

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

      Oh, I see! I apologize for my misunderstanding.
      Btw this greedy is very genius and amazing...(easy to understand but super difficult to come up with during the contest)

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

Problem B is quite similar to 436F

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

Day 2 starts in 10 minutes. This time with complete feedback.

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

Will the standings of Day 2 be available?

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

When will the tutorial for second day be published?

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

    Three of the four problems are done. Robomarathon coming soon. Sorry for the delay.

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

      Just as a reminder if you have forgotten to add it, but I would like to see the solution to the problem "Robomarathon". I don't intend to hurry you, but I would be grateful if you add some brief editorial about this.

      • »
        »
        »
        »
        12 days ago, # ^ |
        Rev. 2   Vote: I like it +11 Vote: I do not like it

        Or does anyone know the solution? It seems it was a bit relatively easy one in this problem set, but I haven't got to the right answer even though it has passed 3 weeks after the contest ended. I've been distressed by this problem from morning till night for more than a half the month (note: contains some exaggerations). I guess many participants have already forgotten how to solve this problem, but would anyone help me get out of this restive circumstance?

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

Can someone please tell me why this approach doesn't work for B — Decryption of ROI Day 2: Start from the first element in the sequence not already put in a segment, create a new segment and put every subsequent element such that it's larger or equal to the first element in this segment, and the maximum of all of the remaining numbers is greater or equal to the current maximum element.

Here's my code:

I'm really curious why this gives WA, because at first glance it looks like it's optimal.