摘要: 点击查看代码 #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N = 1e5 + 10; int n; struct Range { int l, r; bool oper 阅读全文
posted @ 2022-06-03 22:04 wKingYu 阅读(32) 评论(0) 推荐(0)
摘要: 记忆化搜索 点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 310; int n, m; int h[N][N]; int f[N][N]; int dx[4] = {-1, 0, 1, 0 阅读全文
posted @ 2022-06-03 21:09 wKingYu 阅读(33) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 6010; int n; int happy[N]; int h[N], e[N], ne[N], idx; bool has_father[ 阅读全文
posted @ 2022-06-03 12:27 wKingYu 阅读(30) 评论(0) 推荐(0)
摘要: 位运算 + 状态压缩DP 点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 20, M = 1 << 20; int n; int w[N][N]; int f[M][N]; int main 阅读全文
posted @ 2022-06-03 11:08 wKingYu 阅读(41) 评论(0) 推荐(0)