Day -2在学校呆了inf天之后终于回家了!Day 0在家无(tui)所(fei)事(mo)事(yu),顺便被拉出去剪了个头发,想写写thusc2017的题也写不动,一直在网上冲浪,到处乱翻以前做过的题;晚上翻自己博客背背板子,看会手机就睡了。Day 1早上起床,感觉冷冷冷冷冷冷冷神志不清地赶到学校,发现一众神仙已经在学校外等着了于是我就直接进去了报道领了个狗牌和...
Swaps in PermutationYou are given a permutation of the numbers1, 2, ..., nandmpairs of positions(aj, bj).At each step you can choose a pair from the given positions and swap the numbers...