class Solution { public: const int M = 1000000007; using LL = long long; LL merge(vector<int>& nums, vector<int>& tmp, int l, int r) { if (l >= r) return 0; int m = (l + r) >> 1; LL res = merge(nums, tmp, l, m) + merge(nums, tmp, m +...