
动态规划
#
MySGDLife
总分总
展开
-
Codeforces Round #672 (Div. 2) C1. Pokémon Army (easy version)
This is the easy version of the problem. The difference between the versions is that the easy version has no swap operations. You can make hacks only if all versions of the problem are solved. Pikachu is a cute and friendly pokémon living in the wild pikac原创 2020-11-26 22:27:34 · 191 阅读 · 0 评论 -
背包问题
背包问题是线性dp的一种特殊模型 其主要问题分为以下几种 1.01背包问题 对于每种物品的状态只有拿或者不拿两种状态 有 N 件物品和一个容量是 V 的背包。每件物品只能使用一次。 第 i 件物品的体积是 vi,价值是 wi。 求解将哪些物品装入背包,可使这些物品的总体积不超过背包容量,且总价值最大。 输出最大价值。 #include <bits/stdc++.h> using na...原创 2020-02-06 12:43:51 · 209 阅读 · 0 评论 -
POJ 2533 POJ 1458 HUD 1423 动态规划 LIS LCS LCIS
最长上升子序列 TimeLimit:1000MS MemoryLimit:64MB 64-bit integer IO format:%lld Problem Description 如果一个数列ai 满足 a1 < a2 < … < aN 则这个数列被称作上升序列。 给定一个数列a(a1, a2, …, aN)则任意一个数列b(ai1, ai2, …, aiK)并且满足(1 ...原创 2019-08-15 00:06:14 · 155 阅读 · 0 评论