UVA12856 Counting substhreengs

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=861&page=show_problem&problem=4721 [PDF](https://uva.onlinejudge.org/external/128/p12856.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12856/5ddf011a8817a94c3351aa6bcc195df79c13a75e.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12856/927b7ef05d92c8620cffc2d20faa522d28b7a151.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12856/29ef107b9546595bef63469bc0cf958223f663e5.png)