![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数组覆盖
binggo1226
这个作者很懒,什么都没留下…
展开
-
编程技巧,数组覆盖
假设知道[left,right]上面D数组的值要加上a 那么可以D[left]=a; D[right+1]=-a; 这样就算有多个left,right 最后只要 for(int i=0;i<n;i++) { D[i]+=D[i-1]; } 就可以将数组覆盖上值转载 2017-03-05 15:30:33 · 825 阅读 · 0 评论 -
hdu2675二分解方程
#include<iostream> #include<cmath> #include<cstdio> #define EXP 1e-8 #define f(x) log(x)/x using namespace std; const double e = 2.718281828459; int main() { //连边取对数 化简 double Y; whil转载 2017-03-05 16:31:51 · 249 阅读 · 0 评论