All Questions
1
question
-1
votes
0
answers
2k
views
Find the number of good swaps.
Suppose we are given a positive integer N. Consider the sequence S=(1,2,…,N). You should choose two elements of this sequence and swap them.A swap is nice if there is an integer M (1≤M<N) such that ...