Time Limit: 2 Sec Memory Limit: 128 MB
Suppose there are n students in CS203 DSAA, the height of each student is
Please print
If it has more than one possible solution, print the height of the student in seats
There will be two lines.
The first line will be an integer
The second line will be
For all test cases,
There will be two lines.
The first line prints the value of
The second line prints the height of the student in seats
6
6 5 4 3 2 1
3
1 3 4 2 5 6
You can find the definition of lexicographical order at https://en.wikipedia.org/wiki/Lexicographic_order