#include <iostream> #include <vector> using namespace std; long long merge(vector<int>& arr,vector<int>& help,int l, int m,int r) { long long ans = 0; long long sum = 0; for(int j = m+1,i = l;j <=r;++j) { while(i<=m && arr[i] <...