Primed Subsequence

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1812 [PDF](https://uva.onlinejudge.org/external/108/p10871.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10871/16bc20429b26f7f17fe828f041c764c8b024d1a1.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10871/39db725c5f9967a2779f94fff8658444080fb659.png)

输出格式


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

输入输出样例

输入样例 #1

3
5 3 5 6 3 8
5 6 4 5 4 12
21 15 17 16 32 28 22 26 30 34 29 31 20 24 18 33 35 25 27 23 19 21

输出样例 #1

Shortest primed subsequence is length 2: 5 6
Shortest primed subsequence is length 3: 4 5 4
This sequence is anti-primed.