![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
年轻过成了秃顶
这个作者很懒,什么都没留下…
展开
-
Sequence
题目链接:https://nanti.jisuanke.com/t/40258打这场现场赛的时候,真的就是无悔了。 毕竟字典树和taijan都没学过,现在觉得这场比赛应该能拿银的。不过正式赛肯定不一样。以现在的水平也许能拿个铜吧。将公式展开,我们可以发现每个数会被异或多少次。我们会发现,如果(l,r)之间的个数是偶数个,那么每个数就是会被异或偶数次,那答案就是0.如果之间的个数是奇数个,那么我...原创 2019-10-25 23:03:29 · 108 阅读 · 0 评论 -
B. Interesting Array(线段树)
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。题目链接:http://codeforces.com/problemset/problem/482/BWe’ll call an array of n non-negative integers a[1], a[2], …, a[n] interesting, if it meets m constraints. The i-...原创 2019-08-13 10:12:16 · 150 阅读 · 0 评论 -
F. SUM and REPLACE codeforces920f(线段树)
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。求一个数的因子个数:https://blog.csdn.net/ii0789789789/article/details/79683286Let D(x) be the number of positive divisors of a positive integer x. For example, D(2) = 2 (2 i...原创 2019-08-12 16:30:26 · 124 阅读 · 0 评论 -
CodeForces 438D The Child and Sequence(线段树)
题目链接:http://codeforces.com/problemset/problem/438/DAt the children’s day, the child came to Picks’s house, and messed his house up. Picks was angry at him. A lot of important things were lost, in par...原创 2019-08-12 14:52:24 · 122 阅读 · 0 评论 -
HDU6183(线段树)
Do you like painting? Little D doesn’t like painting, especially messy color paintings. Now Little B is painting. To prevent him from drawing messy painting, Little D asks you to write a program to ma...原创 2019-08-11 10:37:49 · 64 阅读 · 0 评论 -
Codeforce 915E(线段树动态开点)
日常安利:https://blog.csdn.net/stay_accept/article/details/79210918本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。This year Alex has finished school, and now he is a first-year student of Berland State University. F...原创 2019-08-10 20:42:46 · 119 阅读 · 0 评论 -
HDU-5249 KPI(STL or 权值线段树)
安利博客:https://blog.csdn.net/qq_35776579/article/details/55004134本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。你工作以后, KPI 就是你的全部了. 我开发了一个服务,取得了很大的知名度。数十亿的请求被推到一个大管道后同时服务从管头拉取请求。让我们来定义每个请求都有一个重要值。我的KPI是由当前管道内请求的重要...原创 2019-08-10 19:48:04 · 124 阅读 · 0 评论 -
247. 亚特兰蒂斯
先安利一篇博客扫描线题目链接;https://www.acwing.com/problem/content/249/题目:有几个古希腊书籍中包含了对传说中的亚特兰蒂斯岛的描述。其中一些甚至包括岛屿部分地图。但不幸的是,这些地图描述了亚特兰蒂斯的不同区域。您的朋友Bill必须知道地图的总面积。你自告奋勇写了一个计算这个总面积的程序。输入格式输入包含多组测试用例。对于每组测试用例,第...原创 2019-08-10 12:44:52 · 216 阅读 · 0 评论 -
246. 区间最大公约数(线段树+树状数组)
题目链接:https://www.acwing.com/problem/content/247/给定一个长度为N的数列A,以及M条指令,每条指令可能是以下两种之一:1、“C l r d”,表示把 A[l],A[l+1],…,A[r] 都加上 d。2、“Q l r”,表示询问 A[l],A[l+1],…,A[r] 的最大公约数(GCD)。对于每个询问,输出一个整数表示答案。输入格式第一行...原创 2019-08-09 10:27:58 · 448 阅读 · 0 评论 -
AcWing 245. 你能回答这些问题吗(线段树)
题目链接:https://www.acwing.com/problem/content/246/给定长度为N的数列A,以及M条指令,每条指令可能是以下两种之一:1、“1 x y”,查询区间 [x,y] 中的最大连续子段和,即 maxx≤l≤r≤y{∑ri=lA[i]}。2、“2 x y”,把 A[x] 改成 y。对于每个查询指令,输出一个整数表示答案。输入格式第一行两个整数N,M。...原创 2019-08-06 21:06:15 · 199 阅读 · 0 评论 -
E - No Pain No Game HDU 4630 线段树
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。Life is a game,and you lose it,so you suicide.But you can not kill yourself before you solve this problem:Given you a sequence of number a 1, a 2, …, a n.They are ...原创 2019-08-13 13:25:22 · 92 阅读 · 0 评论