摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e5 + 10; int e[N], r[N], l[N]; int idx; void init() { r[0] = 1; l[1] = 0; idx = 2; } voi 阅读全文
posted @ 2022-04-29 23:14 wKingYu 阅读(34) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e5 + 10; int head, idx; int e[N], ne[N]; void init() { head = -1; idx = 0; } void add_to 阅读全文
posted @ 2022-04-28 11:09 wKingYu 阅读(31) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<vector> #include<algorithm> using namespace std; typedef pair<int, int> PII; vector<PII> segs; void merge(vector<PI 阅读全文
posted @ 2022-04-27 22:44 wKingYu 阅读(77) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<vector> #include<algorithm> using namespace std; typedef pair<int, int> PII; const int N = 3e5 + 10; vector<int> al 阅读全文
posted @ 2022-04-27 21:49 wKingYu 阅读(37) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; int lowbit(int x) { return x & -x; } int main() { int n; scanf("%d", &n); while (n --) { int x; scanf(" 阅读全文
posted @ 2022-04-27 16:57 wKingYu 阅读(31) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e5 + 10; int a[N], b[N]; int main() { int n, m; scanf("%d %d", &n, &m); for (int i = 0; 阅读全文
posted @ 2022-04-27 16:30 wKingYu 阅读(29) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e5 + 10; int a[N], b[N]; int main() { int n, m, x; scanf("%d %d %d", &n, &m, &x); for (i 阅读全文
posted @ 2022-04-27 16:15 wKingYu 阅读(33) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e5 + 10; int a[N], s[N]; int main() { int n, res = 0; scanf("%d", &n); for (int i = 0; i 阅读全文
posted @ 2022-04-27 15:53 wKingYu 阅读(35) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e3 + 10; int a[N][N], b[N][N]; void insert(int x1, int y1, int x2, int y2, int c) { b[x1 阅读全文
posted @ 2022-04-26 22:10 wKingYu 阅读(38) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e5 + 10; int a[N], b[N]; void insert(int l, int r, int c) { b[l] += c; b[r + 1] -= c; } 阅读全文
posted @ 2022-04-26 21:39 wKingYu 阅读(31) 评论(0) 推荐(0)