1899: finding string
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:27
解决:17
题目描述
input two strings a, b, and determine whether a is a substring of b . For example, "is" is a substring of "this", and the number of occurrences is 1. But "is" is not a substring of “sit”. Note that letters are not used repeatedly.
输入
There are several lines , with two strings per line.
输出
If the first is a substring of the second string, output the number of occurrences, if not, output the first is not a substring of the second string
样例输入 复制
is this
is sit
ab aaabbaabba
abcdefgh abcdefg
样例输出 复制
the number of occurrences of "is" in "this" is 1
"is" is not a substring of "sit"
the number of occurrences of "ab" in "aaabbaabba" is 2
"abcdefgh" is not a substring of "abcdefg"