上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: #include<bits/stdc++.h> using namespace std; #define LL long long const int MAXN = 5009; int N; struct Point { double x, y; }p[MAXN], C; // p[i] 表示点集 阅读全文
posted @ 2021-03-09 16:58 棉被sunlie 阅读(64) 评论(0) 推荐(0)
摘要: 习自 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std; # 阅读全文
posted @ 2021-03-09 16:51 棉被sunlie 阅读(128) 评论(0) 推荐(0)
摘要: 题链 线段树记录第i个礼物与之相同的后一个礼物的位置; LL p[MS]; // 记录第i个礼物 后一个礼物位置 LL q[MS]; // 记录第i个礼物 前一个礼物位置 关于修改: 1.删除第pos个礼物:在线段树中将其置为INF(表示该礼物不存在),删除后该礼物左右所指向的礼物位置则需要更改; 阅读全文
posted @ 2021-03-03 17:03 棉被sunlie 阅读(42) 评论(0) 推荐(0)
摘要: 题链 此题与洛谷P6242 【模板】线段树 3为孪生题 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib. 阅读全文
posted @ 2021-03-02 22:01 棉被sunlie 阅读(114) 评论(0) 推荐(0)
摘要: 题链 此题即Picks loves segment tree增加询问历史最值 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #inclu 阅读全文
posted @ 2021-02-23 20:58 棉被sunlie 阅读(183) 评论(0) 推荐(0)
摘要: 题链 关于修改: min修改:直接递归到节点(maxse < val < maxf),转化为对节点最大值的加减; add修改:划分为对 节点最大值 和 节点其余值 的加减; lazy标记 最大值的加减lamaxf 和 其余值的加减laoth 重点在于将 min修改 和 add修改 变为同一修改 #i 阅读全文
posted @ 2021-02-21 14:51 棉被sunlie 阅读(183) 评论(0) 推荐(0)
摘要: 题链 关于修改:直接递归到节点(maxse < val < maxf),转化为只关于该节点最大值的加减; #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <st 阅读全文
posted @ 2021-02-21 13:21 棉被sunlie 阅读(78) 评论(0) 推荐(0)
摘要: 题链 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std; # 阅读全文
posted @ 2021-02-16 23:46 棉被sunlie 阅读(52) 评论(0) 推荐(0)
摘要: 题链 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std; # 阅读全文
posted @ 2021-02-16 23:45 棉被sunlie 阅读(24) 评论(0) 推荐(0)
摘要: A. Boboniu Likes to Color Balls Boboniu gives you r red balls, g green balls, b blue balls, w white balls. He allows you to do the following operation 阅读全文
posted @ 2020-08-15 13:09 棉被sunlie 阅读(172) 评论(0) 推荐(1)
上一页 1 ··· 6 7 8 9 10 11 12 下一页