UVA-11942 - Lumberjack Sequencing

  • UVa Online Judge 解題結果請於 Submit 後,參閱 uHunt
  • 如果你有任何建議與指教,歡迎於下方留言一起討論喔!
  • 本題選為「20160524 大學程式能力檢定 CPE」題目。

題意概要

本題給定將給定數筆測資,每筆測資皆有 個數字,試問:每筆測測資是否為「單調數列 (遞增或遞減數列)」?


Input

The input starts with line containing a single integer , , which is the number of groups to process. Following this are lines, each containing ten distinct positive integers less than .


Output

There is a title line, then one line per set of beard lengths. See the sample output for capitalization and punctuation.


Sample Input

3
13 25 39 40 55 62 68 77 88 95
88 62 77 20 40 10 99 56 45 36
91 78 61 59 54 49 43 33 26 18

Sample Output

Lumberjacks:
Ordered
Unordered
Ordered
profile-image
David Lu
Hello, I'm David Lu. I am a graduate student in Department of Computer Science at National Chiao Tung University, Taiwan. I am in the Networking and Sensing Systems (NSS) Lab at NCTU. If you have any question, please feel free to contact with me.
comments powered by Disqus