随笔分类 -  刷题

刷题记录
摘要:题目来源 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) 编辑
摘要:题目来源 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) 编辑
摘要:AcWing 1012友好城市 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; const int N = 5e3+5; int n; struct Node{ int a, b; boo 阅读全文
posted @ 2021-07-14 22:28 chaosliang 阅读(24) 评论(0) 推荐(0) 编辑
摘要:AcWing 896 最长上升子序列II #include <iostream> #include <cstdio> using namespace std; const int N = 1e5+5; int n; int h[N]; int d[N]; //d[i]: 表示长度为i的递增序列的末尾 阅读全文
posted @ 2021-07-13 22:36 chaosliang 阅读(35) 评论(0) 推荐(0) 编辑

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