03 2023 档案

摘要:题目来源 acwing 题目难度 3星 算法标签 完全背包 + 高等代数 参考程序 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 105, M = 2500 阅读全文
posted @ 2023-03-20 21:38 chaosliang 阅读(14) 评论(0) 推荐(0) 编辑
摘要:题目来源 acwing 题目难度 2星 算法标签 二分 参考程序 // Forward declaration of compare API. // bool compare(int a, int b); // return bool means whether a is less than b. 阅读全文
posted @ 2023-03-18 21:37 chaosliang 阅读(17) 评论(0) 推荐(0) 编辑
摘要:num: 2 3 5 7 8 9 //每一个出现的数,从小到大排序好 cnt: 2 1 1 2 3 1 //每个出现的数的数量,比如3表示8出现3次 dp表达方式:dp[n][2] dp[i][0]:表示在区间1~i上,不选num[i]的最大分数划分方案 dp[i][1]:表示在区间1~i上,选择n 阅读全文
posted @ 2023-03-18 19:46 chaosliang 阅读(8) 评论(0) 推荐(0) 编辑
摘要:题目来源 acwing 题目难度 3星 算法标签 dp + 优化 参考程序 #include <iostream> using namespace std; const int N = 3005; int n; int a[N], b[N]; //dp[i][j]表示a的前i个数,b的 //前j个数 阅读全文
posted @ 2023-03-09 19:05 chaosliang 阅读(13) 评论(0) 推荐(0) 编辑
摘要:题目来源 acwing 题目难度 3星 算法标签 dp+搜索 程序 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; const int N = 55; int n; int up[N]; 阅读全文
posted @ 2023-03-07 17:48 chaosliang 阅读(17) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示