佛奴儿
佛奴儿
全部文章
未归档
归档
标签
去牛客网
登录
/
注册
Roni
ACMer
全部文章
/ 未归档
(共985篇)
NYOJ 228 士兵杀敌(五)【差分标记裸题】
题目链接 所有元素初始值为0才能这么做: ①l--r全加1 a[l]++; a[r+1]--; 求一遍前缀和为元素本身。 求两遍前缀和为元素前缀和。 #include<cstdio> #include<string> #include<cstdlib> #in...
2018-08-24
0
383
2017CCPC 杭州 J. Master of GCD【差分标记/线段树/GCD】
给你一个n个初始元素都为1的序列和m个询问q。 询问格式为:l r x(x为2or3) 最后求1~n所有数的GCD GCD:把每个数分别分解质因数,再把各数中的全部公有质因数提取出来连乘,所得的积就是这几个数的最大公约数。 #include<cstdio> #include<st...
2018-08-23
0
393
HDU 6186 CS Course【前后缀位运算枚举/线段树】
【前后缀枚举】 #include<cstdio> #include<string> #include<cstdlib> #include<cmath> #include<iostream> #include<cstring> ...
2018-08-23
0
432
CF1025B Weakened Common Divisor【数论/GCD/思维】
#include<cstdio> #include<string> #include<cstdlib> #include<cmath> #include<iostream> #include<cstring> #include&...
2018-08-23
0
407
网络流算法笔记
【例题】 1.POJ Drainage Ditches 【最大流EK算法模板】 #include<cstdio> #include<string> #include<cstdlib> #include<cmath> #include<iostr...
2018-08-23
0
391
CF1027C Minimum Value Rectangle【贪心/公式化简】
https://www.luogu.org/problemnew/show/CF1027C #include<cstdio> #include<string> #include<cstdlib> #include<cmath> #include<...
2018-08-22
0
416
ZOJ 3872 Beauty of Array【无重复连续子序列的贡献和/规律/DP】
Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to k...
2018-08-22
0
406
LCA算法笔记
LCA,最近公共祖先,实现有多种不同的方法,在树上的问题中有着广泛的应用,比如说树上的最短路之类。 LCA的实现方法有很多,比如RMQ、树链剖分等。 今天来讲其中实现较为简单的三种算法: RMQ+时间戳、树上倍增(类似二分步长)、Tarjan算法(DFS+并查集)。
2018-08-22
0
0
ST表算法笔记
【模板】洛谷P3865 #include<cstdio> #include<string> #include<cstdlib> #include<cmath> #include<iostream> #include<cstring&...
2018-08-22
0
367
二分图匹配算法笔记
定义 给定一个二分图G,在G的一个子图M中,M的边集{E}中的任意两条边都不依附于同一个顶点,则称M是一个匹配。 极大匹配(Maximal Matching)是指在当前已完成的匹配下,无法再通过增加未完成匹配的边的方式来增加匹配的边数。最大匹配(maximum matching)是所有极大匹配当中...
2018-08-21
0
380
首页
上一页
17
18
19
20
21
22
23
24
25
26
下一页
末页