逆序对—分治法 #include <iostream>using namespace std;int a[1000001];int ans =0;int n;int temp[1000001];void marge1(int a[], int l,int mid,int r){ int i=l,j=mid+1,k=0; while(i <= mid && j <= r) { if (a[i]<=a[ c++ 2024-06-15 39 点赞 0 评论 59 浏览