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

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

If you've already seen this task somewhere, I'd be grateful for the link.

You are given a string of length about $$$10^5$$$. There are many queries about intervals of this string and for each interval, you have to calculate the number of distinct subsequences (not necessarily contiguous) of this interval.

The solution builds a segment tree and keeps matrices in each node. Have you seen this problem?

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

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

cs academy task subsequence queries Link

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

A slightly different problem but a similar type(DP + segment tree with matrix in a node) https://codeforces.com/contest/750/problem/E (By errichto).

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

Do you mean problem K, Subsequence Queries from XVIII Open Cup, GP of Korea? The same statement with the problem of CSAcademy, but with constraints $$$N,Q\leq 10^6$$$ and $$$\vert \Sigma \vert =26$$$.

Link to the contest: XVIII Open Cup named after E.V. Pankratiev. Grand Prix of Korea.