#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

TASK: ChristmasSort Every year at West Bartholomew University, a pancake sorting competition is held. The rules vary each year to add to the excitement during the Christmas Period. You might note that in 1979, a rather famous buisness man, William Gates, have won it along with Papadimitriou. It's a rather prestigious competition. This year, Proffessor Nottle had the opportunity to organise this prestigious event. She had decided the rules as follows. You are allowed to flip a stack of pancakes if they are next to each other. For example: 1 2 3 4 5 Flipping within index 1 and 3 will result in 1 4 3 2 5 (Note that they are 0-indexed). The winner of the competition is decided by whoever uses the least amount of flips. INPUT FORMAT There will be one integer N, followed by N lines containing one integer of various pancake sizes. OUTPUT FORMAT You are to supply a list of flips in order to sort the list such that it goes from smallest to biggest. SAMPLE INPUT 1 3 2 5 4 SAMPLE OUTPUT 1 2 3 4 EXPLANATION It allows the flip on pancake at index 1 to index 2. Thus creating a sorted list. SCORING Your score will be graded linearly per test case. 100 will be awarded to the top scorer (least flips), and 0 will be awarded to the person with N flips. This will be implemented manually so your score for this question is not finalized until after the contest.

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 100 | 15 | 1s | 32MB | Average |

2 | 0 | 1 | 1s | 32MB | Minimum |