归并求逆序对数 先上模板,复杂度为O(n)void merge_sort(int *a, int l, int r, int *t){ if(r - l > 1){ int mid = l + (r-l)/2; int p = l, q = mid, i = l; merge_sort(a, l, mid, t); merge_sort(a, mid, r, t); datastructrue 2024-06-15 46 点赞 0 评论 69 浏览