{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"PLAIN","content":"求模式串在待匹配串的出现次数。11"}},{"title":"Input","value":{"format":"PLAIN","content":"第一行是一个数字T,表明测试数据组数。\n之后每组数据都有两行:第一行为模式串,长度不大于10000;第二行为待匹配串,长度不大于1000000。所有字符串只由大写字母组成。"}},{"title":"Output","value":{"format":"PLAIN","content":"每组数据输出一行结果。"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"4\nABCD\nABCD\nABA\nABABABA\nCDCDCDC\nCDC\nKMP\nNAIVE\n"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"1\n3\n0\n0"}}]}