#include <bits/stdc++.h> using namespace std; int n,q; const int N = 100010; long long a[N],dp[N];//状态转移方程 int main() { scanf("%d%d",&n,&q); for(int i = 1;i<=n;i++) { scanf("%lld",&a[i]); dp[i] = dp[i-1] + a[i]; } while(...