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

Автор Lewin, история, 6 лет назад, перевод, По-русски

Всем привет! Уже в эту субботу, 3 марта состоится первый отборочный раунд Яндекс.Алгоритма 2018. Я являюсь автором большинства задач соревнования, с небольшой помощью от GlebsHP.

Хотелось бы поблагодарить GlebsHP за его помощь и координирование раунда, MikeMirzayanov за платформу polygon, а также всех, кто помог с тестированием и прорешивание раунда.

Увидимся на соревновании!

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

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

Is it rated for div.1 or div.2?

And where is it in the Contest list?

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

Where is it in the contest list? I want to join the contest.

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

    If you haven't participated in qualifying or warming-up contests, you can't join the first round. Otherwise, go to the link in the comment above

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

10 am MSK on Saturday? Kinda strange timing if you aim for russian participants.

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

    Why? Because of Friday night drinking? That's only in the West. (In Russia, it's every night drinking.)

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

    10AM on weekend? Seems completely fine.

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

      Saturday might be not a weekend for some students

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

        Seriously? Who has courses on Saturday? Even if there are such cases I believe this is a rare case? Either way, there are many contests between Monday and Friday and I assume all students have courses these days :)

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

          i had classes on Saturday while i was at school

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

          In Russia it is quite common to have classes on Saturday for both high school and university students

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

            Huh, didn't expect it. Maybe that's why Russians are so good ;). Do you have six working days or do you have free Monday or are courses on Saturdays "lighter" or "extracurricular" in some sense?

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

              In high school there are long summer holidays (3 months)

              In Moscow State University we had some random week day marked for “self-studying” (basically day off)

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

In the ruleset it states that if two participants have the same score they will be compared with their lowest rank in the three contests.
Does that mean that if I miss a contest I automatically get a lower position than someone who has the same score but participated in all three contests?

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

    Duh, "lowest" is always confusing when talking about standings. It can be the case that lowest means better and that seems to be more probable case.

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

If I can't participate Round 1 at the exact time mentioned above, does it mean that I'm not able to participate in the contest?

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

How will top 256 participants be decided(for t-shirts)? GP 30 scores are 0 for >30 rank. So will it just be about lowest rank in three contests?

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

How to solve B ?

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

    Generate all permutations for mapping [a,j] to [0,9] and see how many of them satisfy the constraint of having a..j as a subsequence. next_permutation in C++ Standard Library can come in handy

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

    Brute Force...consider all 10! arrangements of 0123456789..

    in any arrangement A[i] corresponds to ith alphabet...

    for every arrangement if sub sequence exists or not can be checked in O(string_length)

    overall complexity is ((10!)*string_length)

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

Is C of elimination round usually this hard? And is sqrt-decomposition required for this problem?

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

    I solved it with sqrt dec, also swap(c,d);

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

      What was the main idea? Partitioning nodes into heavy and light nodes based on whether their degree is > sqrt(m). Then doing manual updates for the light ones and storing the updates for heavy ones and later adding the stored value for heavy neighbors?

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

      What does swap(c, d) mean?

      PS: Can I see your source code for this problem?

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

        Possibly that the setter should have set problem C as the present problem D and vice versa.

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

any hints for D, I know that the stamp must be concatenation between prefix and suffix, but how to check if a certain stamp is valid?

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

    No only prefixes and Suffixes For example aabbaa abba is valid abba.. 1st position ababba 3rd position aabbaa 2nd position

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

vi=0 in problem C :)

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

How to solve E?

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

    Build graph with vertexes(index, changed = 0/1), and edges (k_min, k_max), find path of length n.

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

tourist nails it again!! as usual :p

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

what complexity in D?

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

    The editorial is up. The author has allowed O(n4) to pass.

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

    I have O(N3), but I wrote O(N4) first and didn't find tests where it would be slow. Stamps were either too easy or too hard to cover the string with.

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

To everybody with ~10 bombs on E who still wonders "why isn't it passing?!": there was a missable condition in statement, that you can choose K lower than some numbers from the input, but then you just cannot flip them ;_;

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

Where can I see problems if I didn't register?