全部数据点击查看 代码 #include <cstdio> #include <algorithm> #include <iostream> using namespace std; const int maxn = 1e5 + 5; int n, q, sum[maxn]; int main() { scanf("%d%d", &n, &q); int x, y; for (int i = 1; i <= n; ++i) scanf("%d", &x), su...