随笔分类 - 逆序对(归并排序)
摘要:bobo has a sequence a 1,a 2,…,a n. He is allowed to swap two adjacent numbers for no more than k times. Find the minimum number of inversions after hi
阅读全文
摘要:In this problem, you are given two permutations a and b of n numbers, and you need to play a game with them! In this game, you are required to perform
阅读全文