差分
模板
★漂浮ing☆
奋斗ing
展开
-
Codeforces Round #624C. Perform the Combo
C. Perform the Combo time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You want to perform the combo on your opponent in one popula...原创 2020-02-27 11:57:25 · 239 阅读 · 0 评论 -
差分原理
差分就是将数列中的每一项分别与前一项数做差。 首先一个数组 :1 2 5 4 7 3 那么差分之后 :1 1 3 -1 3 -4 -3 其实就是 a[i]=a[i]+a[i−1] 得到的差分序列第一个数和原来的第一个数一样(相当于第一个数减0), 差分序列最后比原序列多一个数(相当于0减最后一个数)。 差分其实就是前缀和的逆运算; 给你一个数组a[5]={1,2,3, 4,5};差...原创 2020-02-27 11:46:50 · 1074 阅读 · 0 评论