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

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

Hello everybody!

On May 27, 23:00 Moscow time, Round 2 of Yandex.Algorithm competition will take place. I wrote the majority of the problems in this contest, with some additional help from Zlobober.

I would like to thank Zlobober for all his help with coordinating this round, MikeMirzayanov for polygon, and of course, everyone who took the time to test this round.

Please note, the problems will be randomly arranged, so make sure you read everything during the round :)

If you are using Java, please submit using Java 7 x32.

See you in the competition soon!

UPD 1: Editorial here: http://codeforces.com/blog/entry/52223

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

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

Any news on the Java support?

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

    For this round specifically, I have reference solutions in Java for all problems. On Yandex, you may have to submit in Java 7 x32, since it seems my solutions time out in the other versions (Java 7 and Java 8 more specifically).

    I'm not sure about general support for other versions, it seems like a hard bug to track down.

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

    We have the state of java compilers as it was several months ago. Java7_x32 runs in client mode (option -client) and runs in time +/- 20% of polygon runs (at least for the problems of this round).

    We will also send an announcement with the fastest java version in the contest system at the beginning of the round.

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

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

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

Why Kotlin is not supported?

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

It says: "You cannot participate in the contest because the registration is closed" -- I am not sure whether this is simply because the contest has not started yet and everything is right, or whether I am using some wrong account (although it appears I am using a correct account...).

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

X is missing

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

>mfw in the middle of the contest
>mfw I submitted harder problems on blind and saw myself in 3rd place

UPD: And both failed. After a lot of local testing even. Awesome.

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

Lol, you definitely should send out reminders. I learned about this competition when it was already 10 mins into contest by randomly strolling on codeforces. I immediately told it to my friends, none of them knew that also.

  • »
    »
    7 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +20 Проголосовать: не нравится

    Hi! I'm terribly sorry you didn't receive the email. After round 1 reminder that went out too late I made sure to schedule the mailing exactly 24 hours before the round and even got my email fine. Thanks for raising the issue, I'll work with the mailing system to fix it.

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

    You may want to add "visiting clist.by" to your daily routine.

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

Elimination stage ranking has beed updated.

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

how to solve C?
i tried to do it with pattern matching instruments of java, but got TL

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

What it is the test №7 in the task С?

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

How to solve C?

EDIT : My approach was same as the editorial. Can anyone explain why I am getting Wrong answer for this code?

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

    The start piece should match the entire prefix of the [l, r] substring, not just the first character if the pattern doesn't start with * (the same goes for the suffix and the last piece).

    Depending on the implementation details, the case when there're no * in the pattern might also be special.

    The general idea of your solution is correct.

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

B is nice!

For problem C I feel ashamed — somehow I thought it was a bitset task, but the intended solution is much simpler and better.

I've seen the "game part" of F in SRM 408 med. Though the other part looks hard enough.

»
7 лет назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

My approach for problem C: for all substrings of size less than or equal 10, map the substring to a vector of its starting positions then for each query binary search for the next string, I think it's O(n * 10 + q * log2.n). Is there any better solution?

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

Участник располагается выше в итоговой таблице отборочного этапа, если имеет:

больше зачетных очков;

меньше минимальное занятое место за четыре раунда отборочного этапа при равенстве зачетных очков.

а кто выше в случае равенства перечисленных показателей?

»
7 лет назад, # |
Rev. 2   Проголосовать: нравится +40 Проголосовать: не нравится

Task E is probably obtained from task F from NAIPC 2017 (I have strong feeling about that). I don't object against such way of creating tasks; that's suitable for ordinary contests, like CF rounds or TC (of course, if solutions uses fresh ideas, different from the source).
BUT Yandex.Algorithm is an annual championship, for such competitions you need to use your best, most interesting tasks. I think so because some people solved NAIPC, some of them came up with this idea during the competition. So, today people who have seen this task had advantage.

UPD: apart from this, I find other tasks nice, especially B and F.

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

    I believe that the intended solution for the problem you mentioned was noticing that 10^18 is a small value and than carefully exploit that fact. Also, the problems are indeed different: there the number of elements of each color wasn't fixed, and the problem statement was to generate an object by a number, not vice versa, and that was why you could exploit the low constraints.

    The solution of this problem requires the calculation of an exact number of sequences without adjacent elements of same color. I don't know how to apply directly the DP from this problem to that problem, can you describe it?

    We knew about the problem you mentioned beforehand, but we decided that it didn't have any significant effect on our contest.

    Apart from it, kudos to Lewin.

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

      I understand solution for the task from NAIPC is different and in fact much easier.
      But still setups for both problems are very similar, and questions asked "find n-th lexicographical" and "find number in lexicographical order" are closely related.

      I believe many strong teams who solved NAIPC came up with this dynamic programming (for example, our team), that's pretty natural. I don't like situation "oh, I know how to solve this problem, I came up with this idea couple of month ago" in top-tier competitions.

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

        They may look similar, but they are about different combinatorial objects. In one of them you fix the correspondence between the colors and quantities, and in another you don't. Can you please elaborate how can the solution of this problem applied there or vice versa? I'm not even sure that the problem from NAIPC is solvable in polynomial time in general case.

        If these problems solutions are not related to each other then I completely disagree that it is wrong to give this problem in our contest. After all when you solve problem X and come up with a cool idea, that is not related to problem X itself but may be applied in problem Y, it is not an Y's author fault, it is your advantage and you are free to use it.

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

Thanks for the problemset. I liked it, especially problem B

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

Why does my this code gets WA test 39. I have done a simple simulation as suggested in the editorial. I am unable to detect the error. Please help.