题解列表

筛选

优质题解

C++代码(代码简洁)

摘要: ###解法 ------------ #####S = x + (x + d1) + (x + d1 + d2) + (x + d1 + d2 + d3) +.... 所以: S = ……

最长子序列

摘要:```cpp #include using namespace std; string s1; int ans = 0; const int L = 1000010; int arr[L]……

动态规划 线性dp

摘要:```cpp #include using namespace std; int INT = 1e9; const int L = 1000; int n; int dp[L][L], a……

多重背包 动态规划

摘要:```cpp #include using namespace std; const int L = 5000 + 50; int n, m; int v[L], w[L], q[L]; ……

完全背包问题,动态规划!!

摘要:其实和01背包问题差别不大,01背包每件物品只能选一个,多重背包每件物品在不超过背包体积的条件下可以选择无限个! ```cpp #include using namespace std; ……

01背包问题 动态规划

摘要:```cpp #include using namespace std; const int L = 5000 + 50; int n, m; int v[L], w[L]; int dp……