UVA250 Pattern Matching Prelims

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=186 [PDF](https://uva.onlinejudge.org/external/2/p250.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA250/f8d3d0a7fa0cd5d055b923c26f9b74249a902754.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA250/20aedd07447dbe14830dc5d079c59aac7ec3753e.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA250/39927a73f8cbb6725595c9c4a225419feef7afdd.png)