
dp
动态规划
QAQ!
这个作者很懒,什么都没留下…
展开
-
[Educational Codeforces Round 93]1398
文章目录A - Bad TriangleB - Substring Removal GameC - Good Subarrays [思维][前缀和] ★★D - Colored Rectangles [dp] ★E - Two Types of Spells [权值线段树][思维] ★★★Educational Codeforces Round 93 (Rated for Div. 2)A - Bad Triangle题意问是否存在三条边,无法组成三角形,如果不存在输出-1,存在输出这三条边.原创 2020-08-27 16:49:55 · 280 阅读 · 0 评论 -
[Educational Codeforces Round 87 (div2)]1354F - Summoning Minions[dp][费用流]
参考博客 dpdpdp做法费用流做法1354F - Summoning Minions[dpdpdp][费用流]题意可以召唤 nnn 个奴才,战场上最多同时可以有 kkk 个奴才每个奴才权值为 a[i]a[i]a[i],召唤到场上后原先场上的奴才权值都可以加上 b[i]b[i]b[i]问要使得最后在场上的权值最大可以按什么样的顺序放奴才,最大的权值为多少做法要使得最后权值尽可能大,可以在场上有 k−1k-1k−1 个奴才的时候,把最后不要再场上的奴才都放场上,这样可以最大化 b[..原创 2020-06-06 15:07:33 · 249 阅读 · 0 评论 -
[Educational Codeforces Round 87 (div2)]1354E - Graph Coloring[dp][01染色]
参考博客1354E - Graph Coloring[dpdpdp][01染色]题意总共有 nnn 个点,mmm 条边要使得任意边 (u,v)(u, v)(u,v) 中 abs(cnt[u]−cnt[v])=1abs(cnt[u] - cnt[v]) = 1abs(cnt[u]−cnt[v])=1, cnt[i]cnt[i]cnt[i] 表示 iii 点的编号每个点的编号为 1,2,31, 2, 31,2,3 其中一个保证边没有重边且没有自环且 111 的个数为 n1n1n1,222 的..原创 2020-05-29 19:40:45 · 205 阅读 · 0 评论 -
[Codeforces Round #635 (div2)]1348E - Phoenix and Berries[dp]
1348E - Phoenix and Berries[dpdpdp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Phoenix is picking berries ...原创 2020-05-12 13:29:35 · 226 阅读 · 0 评论 -
[Codeforces Round #635 (div2)]1337E - Kaavi and Magic Spell[dp]
1337E - Kaavi and Magic Spell[dpdpdp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Kaavi, the mysterious fortu...原创 2020-04-21 13:16:30 · 463 阅读 · 0 评论 -
[Codeforces Round #627]1324E - Sleeping Schedule[dp]
1324E - Sleeping Schedule[dpdpdp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Vova had a pretty weird sleepin...原创 2020-03-14 00:36:35 · 354 阅读 · 0 评论 -
[Codeforces Round #627]1324F - Count Subrectangles[树形dp]
1324F - Count Subrectangles[树形dpdpdp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: You are given a tree consis...原创 2020-03-13 21:38:22 · 178 阅读 · 0 评论 -
历届试题-对局匹配[蓝桥杯][dp]
对局匹配[dp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: 小明喜欢在一个围棋网站上找别人在线对弈。这个网站上所有注册用户都有一个积分,代表他的围棋水平。小明发现网站的自...原创 2020-03-03 23:16:23 · 290 阅读 · 0 评论