Finding the number of unique positions occupied by every node after sequence of swaps

后端 未结 0 877
青春惊慌失措
青春惊慌失措 2021-01-24 12:52

You have N (N <= 50000) nodes on a line, with node i in position i on the line. You are given a sequence of M different swaps (M <= 20000), that is written in the from (a1

相关标签:
回答
  • 消灭零回复
提交回复
热议问题