// 测试链接 https://www.nowcoder.com/practice/edfe05a1d45c4ea89101d936cac32469 #include <iostream> using namespace std; using ll = long long; // 为什么需要用ll类型 int a[100001], help[100001]; ll sum = 0, n; void merge_find(int l, int m, int r) { int i = l, p = l, q = m + 1; while (p <= m &...