总的说,每次分一半来做,就是二分
#include<bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10;
long long a[N], n;
long long b[N];
void GuiBingPaiXu (int l, int r) {
if (l >= r) return;
int mid = (l + r) >> 1;
GuiBingPaiXu (l, mid);
GuiBingPaiXu (mid + 1, r);
int i = l, j = mid + 1, k = l;
for (; i <= mid && j <= r;)
if (a[i] <