awoo's blog

By awoo, history, 7 years ago, translation, In English
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
  • Vote: I like it
  • +20
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

Edit: Please ignore!

»
7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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