post's blog

By post, history, 9 days ago, In English

Abridged Statement: Given the string consisting of characters $$$0,1,2$$$, we have to find the maximum amount of disjoint subsequences equal to $$$2020$$$.

Full statement can be found here as problem H. Also here, but I'm not sure you can access that.

My idea was to (while possible, with restarting) greedly take from left to right as many 2020-s as possible. I first tried the naive version of this, but got WA instead of TLE.

Looking for the full solution. Thanks.

Read more »

  • Vote: I like it
  • +6
  • Vote: I do not like it