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

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

AtCoder Grand Contest 013 will be held on Saturday (time). The writer is maroonrk.

Contest Link

Contest Announcement

The point values are 300 — 500 — 700 — 900 — 1600 — 2000. Note that the contest duration is unusual (150 minutes).

Let's discuss problems after the contest.

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

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

The video editorials you upload on AtCoder live can you please at least provide english subtitles for the international community participating in your contests, as we could also experience your thought process in coming up with the solutions. This would be of much help. Thanks.

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

    Adding subtitles is a lot of work. They already provide well-prepared editorials, I wouldn't ask for more.

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

      Don't ask then. You can learn Japanese instead.

      I'm not so ambitious and would be very glad for english subtitles or the whole video.

      If you add some feature to the international website it's good to do it in English at some point (if not at the beginning).

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

        I think this is called "courtesy abuse" (/nadużywanie uprzejmości). If someone is doing something good for me for free I think I am in no position to demand more. Of course this depends on a specific situation, for example if I think there could be some feature on codeforces that would be helpful to many people then I can politely request, but this would require just a single effort whereas adding subtitles is a permanent addition of a lot of work when I think they are unnecessary since detailed English editorials are always posted.

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

          How do you know they do this for free? I do not know their business model, but I assume that the more users, the more profit. And the more international features to delight customers, the more users.

          Besides I did not see anything impolite in the initial ask. They can say either yes or no — it was just a nice suggestion.

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

            Yeah, I don't say it was impolite, it was rather really polite, but I just thought it would be too much to request ;p.

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

          nadużywanie uprzejmości

          Holy shit...

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

            Huh, I see you are from Tallinn and just said "Holy shit" : D. That brings back terrible memories that haunt me up to this day. About literally by far the worst shot I have ever drunk. It was in Tallinn in Valli Bar and that shot was called "Holy Shit". We were enchanted by its deceiving looks. It was brownish and was decorated with whipped cream! We thought that it would be very sweet and pleasant to drink. I was never so wrong in my life. Words cannot express how terrible it was. I felt burning in my throat even after hour after this. n-1 of us were suffering in agony. But I-won't-say-who said: "But guys, it was good!"

            Sorry for offtop, but I just had to share it xD. Remember, keywords: Valli Bar, Holy Shit. Do this, I recommend :D But once in life, not more :P.

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

              I wonder how do you manage to code, if you can be killed with one shot?

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

Alert: Starts in 10-mins.

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

Problem C today is problem F from Educational Round 10 on Codeforces.

Also, that's escalated quickly (in term of difficulty).

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

Can someone please explain how to avoid double counting using "special operations" in D as mentioned in the editorial? Also, how can we perform RR or RB when x=0 (i.e. no red ball is present)?

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

Reading C's editorial after spending 2 hours on it like

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

    And now I am still confused about C. Can you give me some clearer explanation on it? Thank in advance.

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

Why does my solution TLE for 'A'? It runs in O(n) i think. http://agc013.contest.atcoder.jp/submissions/1221485

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

How to solve B ???*UPD* Editorial updated .Ignore

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

It's possible to solve problem D in O(max(n, m)). First, we observe, that we need to count number of sequences (x1, ..., x2m) such that x1 =  ± 1, xi = xi - 1 ± 1 and there exists z such that z is even and . So, we need to count number of paths that have small difference between maximal and minimal value. This can be done using inclusion–exclusion principle.

Now we need to solve the following problem: for fixed a ≥ 0, b ≤ 0, a and b is even, find the number of paths of length 2m, which don't cross lines y = a and y = b. There is a simple formula for this value, but I don't remember the proof. You can check my code here. First I fix diff = (a - b) / 2. Then I calculate val — the number of paths in case a = diff, b = 0. Then at each step I subtract 2 from b and from a and calculate new number of paths.

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

    Can you, please, explain your idea a little better? I don't get it why what we're asked to compute is equivalent to counting those sequences. I don't see how you considered inserting new bricks at each step in your solution. Generally, I'd be more interested in how are the 2 problems equivalent and exactly what bijection we have between a sequence x1, x2, ..., x(2m) and a path that you described.

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

Почему в С недостаточно для двух муравьев посчитать на какой позиции они должны стоять в ответе(для четырех почему-то достаточно)? Ведь понятно же, что в ответе никакое число больше двух раз не встретится.