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

Автор awoo, история, 7 лет назад, По-русски
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Разбор задач Educational Codeforces Round 30
  • Проголосовать: нравится
  • +20
  • Проголосовать: не нравится

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

In problem E, first I solved it using segment tree after iterating in two loops but I got TLE.

Then I replaced the segment tree with a liner search and I got ACC. How did that happen?

This is my first submission (31286366) which had TLE. My second submission (31286415) which passed.

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

F — good demonstration of overkill in using suffix array.

It is most powerful suffix structure, but anyway it needs additional lcp array, prefix sums array, stack...

Suffix automaton is better here, bcs its need only... one array cnt[]!

GL, kids.

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

Edit: Please ignore!

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

can someone please explain me E ! I didn't understand how to keep all the three maximum possible at a time. if we want to maximize the first one we can (just give 2 to smallest and rest with 1) but this is not the case here !

please help me !

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

    The first two numbers are fixed, when you do these two loops. You just have to choose the third number maximum possible.

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

Isn't this problem similar to 1278C - Berry Jam ?