上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 26 下一页
摘要: 点击查看代码 #include<iostream> #include<algorithm> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n; LL res; int a[N]; int main() { 阅读全文
posted @ 2022-06-14 21:07 wKingYu 阅读(25) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<vector> #include<queue> using namespace std; int n, res; priority_queue<int,vector<int>,greater<int>> heap; int mai 阅读全文
posted @ 2022-06-14 20:04 wKingYu 阅读(31) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; int st, ed, n, res; struct Range { int l, r; bool operator 阅读全文
posted @ 2022-06-14 00:29 wKingYu 阅读(61) 评论(0) 推荐(0)
摘要: 差分 + 贪心 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n; void solve() { cin >> n; vector<pair< 阅读全文
posted @ 2022-06-04 13:10 wKingYu 阅读(56) 评论(0) 推荐(1)
摘要: 点击查看代码 #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-04 12:02 wKingYu 阅读(30) 评论(0) 推荐(0)
摘要: 点击查看代码 #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)
摘要: 去除无效状态的优化写法 复杂度 $ O(n \times 2^{m} \times k) $ ( $k$ 代表去处无效状态后的个数) 总体复杂度 $ < 11 \times 2^{11} \times 2^{11} \approx 4.6 \times 10^{7} $ 点击查看代码 #includ 阅读全文
posted @ 2022-06-02 23:26 wKingYu 阅读(54) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 26 下一页