#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 1000000000 int main(){ int N,Q; cin>>N>>Q; vector> V(N); for(int i=0;i dis(V.size(),0); vector LL(V.size()),RR(V.size()); long long L = 0,R = 0; for(int i=0;i P(0,1000000001); scanf("%lld",&P.first); auto it = upper_bound(V.begin(),V.end(),P); it--; int ind = distance(V.begin(),it); long long ans = dis[ind]; ans += (P.first-V[ind].first)*(LL[ind]-RR[ind]); cout<