並前往https://leetcode.com/problems/k-inverse-pairs-array/discuss/1976503/O(nk)%3A-Dynamic-Programming-%2B-Prefix-Sum