建议评绿
查看原帖
建议评绿
1023514
Allan_Xu楼主2024/10/10 15:07

我们只需归并排序求出原始逆序对的个数,然后每次交换时线性更新即可,

时间复杂度 O(nlogn+nm)O(n \log n+nm)

AC记录

2024/10/10 15:07
加载中...