The sortedness of a sequence of length is the number of pairs such that and .
Perform exactly operations. In each operation, choose an integer with and swap and .
Print the maximum achievable sortedness after all operations and one operation sequence attaining it. A correct maximum alone can receive partial credit only if the submitted operation sequence follows the output format.
Each test case is assigned the point value of its subtask. A correct maximum and an operation sequence attaining it earn . A correct maximum with a properly formatted operation sequence that does not attain it earns . An incorrect maximum or an improperly formatted operation sequence earns . Printing only the maximum, an incorrect number of operations, or indices outside the allowed range does not guarantee . The subtask score is the minimum score over its test cases.
The input is given in the following format.
Print the maximum sortedness on the first line. On each of the next lines, print the integer chosen for operation (, ). Any optimal operation sequence is accepted.
The first line contains and . The second contains space-separated integers .
| 3 | 36 | does not exceed the minimum number of operations needed to sort . |
| 4 | 20 | No additional constraints. |