随笔分类 -  数据结构-树链剖分

摘要:题面:https://www.luogu.org/problem/P2486 阅读全文
posted @ 2019-10-31 23:08 prestige 阅读(197) 评论(0) 推荐(0)
摘要:题面:https://www.luogu.org/problem/P2146 阅读全文
posted @ 2019-10-31 19:37 prestige 阅读(202) 评论(0) 推荐(0)
摘要:题面:https://www.luogu.org/problem/P1505 cpp 本题讲一下取反操作:sum首先取反,max等于取反后的min,min等于取反过的max,那么直接把max,min互换然后分别取反就行了,另外标记直接 xor 1. Code: include include inc 阅读全文
posted @ 2019-10-23 13:23 prestige 阅读(174) 评论(0) 推荐(0)
摘要:题面:http://poj.org/problem?id=2763 cpp 区间求和,修改单边.不加快读见祖宗. Code: include include include include include include include include using namespace std; co 阅读全文
posted @ 2019-10-21 23:11 prestige 阅读(153) 评论(0) 推荐(0)
摘要:题面:https://www.luogu.org/problemnew/show/P3258 cpp 本题中每次所修改路径的终点等于下一次所修改路径的起点,所以每次修改完后要将终点的果子数 1。 Code: include include include include include includ 阅读全文
posted @ 2019-07-24 13:58 prestige 阅读(147) 评论(0) 推荐(0)
摘要:```cpp 【题目描述】: 有根树在计算机科学工程领域是一个人人熟知的数据结构类型。下面是一个例子。 8 (1,4,5);1 (13,14);4 (6,10);5 (9);6 (7,15);10 (2,11,16);16 (3,12); 在这个图中,每个点都是由{1, 2,...,16}中的某个数 阅读全文
posted @ 2019-07-23 14:15 prestige 阅读(181) 评论(0) 推荐(0)
摘要:题面:https://www.luogu.org/problemnew/show/P3178 cpp Code: include include include include include include using namespace std; const long long N=100005 阅读全文
posted @ 2019-07-23 14:14 prestige 阅读(212) 评论(0) 推荐(0)
摘要:题面:https://www.luogu.org/problemnew/show/P2590 cpp Code: include include include include include include using namespace std; const int N=100005,INF=1 阅读全文
posted @ 2019-07-23 14:13 prestige 阅读(219) 评论(0) 推荐(0)
摘要:```cpp include include include include include include using namespace std; define ll long long const int Maxn=100001; int n,m,r,p,a[Maxn],x,y,now[Max 阅读全文
posted @ 2019-07-16 13:36 prestige 阅读(141) 评论(0) 推荐(0)