Professor Monotonic's Networks

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=245&page=show_problem&problem=3448 [PDF](https://uva.onlinejudge.org/external/10/p1007.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA1007/a0c403d18d947510aa07dd37e58e7364cf714670.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA1007/bac7c6ad73ed55dcbf91d8fec241252938e507bc.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA1007/068a43a854e9543dc609a1fb29ed658e4e1e30b0.png)

输入输出样例

输入样例 #1

45
12
24
80
33
12
00
34
23
23
13
12

输出样例 #1

Case 1 is a sorting network and operates in 3 time units.
Case 2 is not a sorting network and operates in 0 time units.
Case 3 is a sorting network and operates in 3 time units.