ACM-ICPC 2018 徐州赛区网络预赛 H. Ryuji doesn't want to study(树状数组)

        Output For each question, output one line with one integer represent the answer. 样例输入 5 3 1 2 3 4 5 1 1 3 2 5 0 1 4 5 样例输出 10 8 两个树状数组一个维护a[i]前缀合,一个维护(n-i+1)*a[i]前缀和。 #include <iostream> #incl
相关文章
相关标签/搜索