bzoj3155 Preprefix sum 线段树

Description Solution 只会写水题了。。 可以发现每次改a[x]就是在改[x,n]的前缀和s,那么线段树区间修改区间查询即可 Code #include <stdio.h> #include <string.h> #include <algorithm> #define rep(i,st,ed) for (int i=st;i<=ed;++i) typedef long lon
相关文章
相关标签/搜索