UVA10100 Longest Match

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1041 [PDF](https://uva.onlinejudge.org/external/101/p10100.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10100/a64f6602b4cf90ec71f1b2ba21a8083af295905b.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10100/2130630fcbcc72e3b647e89a9104ea677cc5e03a.png)