摘要:
#include #include using namespace std; typedef long long ll; const int MAXN = 2e5 + 10; int A[MAXN]; int B[MAXN]; bool vis[MAXN]; int abs(int a) { return a < 0 ? -a : a; } int main () {... 阅读全文
摘要:
交换相邻两数 如果只是交换相邻两数,那么最少交换次数为该序列的逆序数。 交换任意两数 数字的总个数减去循环节的个数?? A cycle is a set of elements, each of which is in the place of another. So in example sequ 阅读全文