随笔分类 -  DP

向下向右走
摘要:https://codeforces.com/contest/2049/problem/D #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 1e18 using namespace std; #define 阅读全文
posted @ 2025-01-24 19:11 laileou 阅读(28) 评论(0) 推荐(0)
说谎与诚实的人
摘要:https://codeforces.com/problemset/problem/2061/C #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair 阅读全文
posted @ 2025-01-23 19:31 laileou 阅读(31) 评论(0) 推荐(0)
倍增算法【模板】
摘要:原题链接https://www.luogu.com.cn/problem/P3865 题解链接https://blog.csdn.net/WJTF2/article/details/136239183?ops_request_misc=%257B%2522request%255Fid%2522%25 阅读全文
posted @ 2025-01-15 20:39 laileou 阅读(54) 评论(0) 推荐(0)
字符串dp+匹配
摘要:https://codeforces.com/problemset/problem/2050/E #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair 阅读全文
posted @ 2025-01-15 17:08 laileou 阅读(26) 评论(0) 推荐(0)
完全背包
摘要:https://www.luogu.com.cn/problem/P1616 #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 1e18 using namespace std; #define lowbit( 阅读全文
posted @ 2025-01-11 11:20 laileou 阅读(28) 评论(0) 推荐(0)
01背包+应用
摘要:https://www.luogu.com.cn/problem/P1049 #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define endl '\n 阅读全文
posted @ 2025-01-11 10:50 laileou 阅读(30) 评论(0) 推荐(0)
01背包【模板】
摘要:https://www.luogu.com.cn/problem/P2871 #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define endl '\n 阅读全文
posted @ 2025-01-11 09:47 laileou 阅读(39) 评论(0) 推荐(0)