Sorting Slides
Sorting Slides |
Professor Clumsey is going to give an important talk this afternoon. Unfortunately, he is not a very tidy person and has put all his transparencies on one big heap. Before giving the talk, he has to sort the slides. Being a kind of minimalist, he wants to do this with the minimum amount of work possible.
The situation is like this. The slides all have numbers written on them according to their order in the talk. Since the slides lie on each other and are transparent, one cannot see on which slide each number is written.
![](http://acm.dhu.edu.cn/onlinejudge/images/UVA/663/1.gif)
Well, one cannot see on which slide a number is written, but one may ded