Minimum Replacements to Sort the Array(数组排序的最少替换数)
数组nums中的元素nums[i]可以替换为任意两个数a,b,前提是a+b=nums[i].把数组nums变为升序(可以有相等)数组需要多少次替换。思路:排序数组是左边的元素=0;i--){if(nums[i]>right){intsplitCnt=(nums[i]-1)/right;right=nums[i]/(splitCnt+1);res+=splitCnt;}else{right=nums