上一页 1 2 3 4 5 6 7 8 9 10 ··· 26 下一页
摘要: Flood Fill 问题 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1000 + 10; #define x first #define y second int 阅读全文
posted @ 2022-08-02 16:55 wKingYu 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 单调性 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n, m, op; int a[N]; void solve() { scanf("%d 阅读全文
posted @ 2022-07-31 13:21 wKingYu 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 线段树 区间修改(加,乘),区间查询(求和) 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e5 + 10; int n, m, p; LL w[N]; struct 阅读全文
posted @ 2022-07-30 10:46 wKingYu 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 差分 + 贪心 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n; int a[N], b[N]; void solve() { cin >> 阅读全文
posted @ 2022-07-23 18:16 wKingYu 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 分治 递归 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; const LL mod = 9901; LL a, b; LL qmi(LL a, LL 阅读全文
posted @ 2022-07-23 10:55 wKingYu 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 位运算 大数乘法 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e5 + 10; LL a, b, p; void solve() { cin >> a >> b >> 阅读全文
posted @ 2022-07-21 18:18 wKingYu 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 线段树 区间修改,区间查询(和) 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e5 + 10; int n, m; int w[N]; struct Node { i 阅读全文
posted @ 2022-07-21 17:25 wKingYu 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 线段树,转换为差分数组 单点修改,区间查询(和,最大公约数) 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e5 + 10; int n, m; LL w[N]; st 阅读全文
posted @ 2022-07-21 11:34 wKingYu 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 线段树 单点修改,区间查询(子段和的最大值) 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e5 + 10; int n, m; int w[N]; struct No 阅读全文
posted @ 2022-07-20 23:40 wKingYu 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 线段树 单点修改,区间查询(最大值) 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 2e5 + 10; int m, p; struct Node { int l, r; 阅读全文
posted @ 2022-07-20 20:49 wKingYu 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 26 下一页