![](https://img-blog.csdnimg.cn/20190927151132530.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
线性dp
线性dp
_sky123_
这个作者很懒,什么都没留下…
展开
-
Educational Codeforces Round 21 G Anthem of Berland
题目链接Berland has a long and glorious history. To increase awareness about it among younger citizens, King of Berland decided to compose an anthem.Though there are lots and lots of victories in history of Berland, there is the one that stand out the most.原创 2020-08-25 17:23:39 · 287 阅读 · 0 评论 -
Two Matchings
链接:https://ac.nowcoder.com/acm/contest/5668/E来源:牛客网题目描述A permutation of length nnn is an array p=[p1,p2,…,pn]p=[p_1, p_2, \ldots, p_n]p=[p1,p2,…,pn], which contains every integer from 111 to nnn (inclusive) and each number appears exactly once. For e原创 2020-07-31 15:42:31 · 215 阅读 · 0 评论 -
K-Bag
链接:https://ac.nowcoder.com/acm/contest/5671/K来源:牛客网A sequence is called kkk-bag, if and only if it is put in order by some (maybe one) permutations of 111 to kkk. For example, 1,2,3,2,1,3,3,2,11,2,3,2,1,3,3,2,11,2,3,2,1,3,3,2,1 is a valid 333-bag sequenc原创 2020-07-27 18:44:20 · 227 阅读 · 0 评论 -
Unmerge
Let a and b be two arrays of lengths n and m, respectively, with no elements in common. We can define a new array merge(a,b)merge(a,b)merge(a,b) of length n+mn+mn+m recursively as follows:If one of the arrays is empty, the result is the other array. That原创 2020-07-26 10:00:45 · 206 阅读 · 0 评论 -
Educational Codeforces Round 87 (Rated for Div. 2) E.Graph Coloring
You are given an undirected graph without self-loops or multiple edges which consists of n vertices and m edges. Also you are given three integers n1n_1n1, n2n_2n2 and n3n_3n3.Can you label each vertex with one of three numbers 1, 2 or 3 in such way, t原创 2020-05-18 21:37:38 · 339 阅读 · 0 评论