l3q1

You cannot submit for this problem because the homework's deadline is due.

Description

Use python3 or OCmal to implement sort and count algorithm.

Submission Format

Submit a tar or zip file including a script named sortcount.ml.

IO

Input

A line of numbers, separated by single space.

Output

Two lines.
The first line is the count of inversions.
The second line is the sorted results.

Sample IO

input

3 4 2 1

output

5
[1, 2, 3, 4]

l3

Not Claimed
Status
Finished
Problems
4
Open Since
2023-09-30 00:00
DDL
2023-12-10 23:59
Extension
0.0 hour(s)