随笔分类 -  线段树

摘要://某题代码#include<iostream> #include<cstdio> #include<map> #include<cstring> using namespace std; long long a[100001],cnt=1; long long Max(long long AA,l 阅读全文
posted @ 2021-11-07 20:17 latent_Lin 阅读(43) 评论(0) 推荐(0)
摘要:注:π(x):1~x的素数个数 当x足够大,趋近于x/ln(x) 阅读全文
posted @ 2021-08-18 22:00 latent_Lin 阅读(28) 评论(0) 推荐(0)
摘要:原题在此 某位大佬用线段树做的 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int N=3e5+7; inline int read(){ i 阅读全文
posted @ 2021-08-12 21:43 latent_Lin 阅读(88) 评论(0) 推荐(0)
摘要:树剖,我又来了!!! 阅读全文
posted @ 2020-10-27 20:38 latent_Lin 阅读(82) 评论(0) 推荐(0)
摘要:题目描述 如题,已知一个数列,你需要进行下面两种操作: 将某区间每一个数加上 k。 求出某区间每一个数的和。 输入格式 第一行包含两个整数 n, m,分别表示该数列数字的个数和操作的总个数。 第二行包含 n 个用空格分隔的整数,其中第 i 个数字表示数列第 i 项的初始值。 接下来 m 行每行包含  阅读全文
posted @ 2020-08-20 14:48 latent_Lin 阅读(253) 评论(0) 推荐(0)