[CTSC2017] longest ascending self-sequence (pseudo-puzzle) (tree array +DP set dp+ minimum cost maximum flow +johnson Shortest path +yang_tableau)

Source: Internet
Author: User

Part of the practice is many, but every thought out of one also more 5~10 points. The positive solution is not yet, the following are a variety of partial approaches:

Subtask 1:k=1

The length of the LCS is up to 1, which means that there is no j>i and a[j]>a[i] at the same time. is obviously an LDS, the tree-like array directly to ask.

Subtask 2:k=2

Up to two, which can be combined by two LCS, F[i][j] indicates that the first LCS ends with I, the second is the number of scenarios ending with J, and the transfer is obvious.

Subtask 3:k=2

Tree-like array optimized DP, complexity reduced from $o (n^3) $ to $o (n^2 \log N) $

Subtask 4,5:b<=8

DP Set dp:https://www.cnblogs.com/clnchanpin/p/7357564.html

Generally with "subsequence" appears at the same time, such as the longest rise from the sequence, the longest public self-sequence and so on.

Subtask 6, 7:

An obvious theorem: a sequence of LCS with a maximum of k means that the sequence can be composed of at least one K disjoint LDS.

[CTSC2017] longest ascending self-sequence (pseudo-puzzle) (Tree array +dp dp+ minimum cost maximum flow +johnson shortest path +yang_tableau)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.