{"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":"HTML","content":"\u0026emsp;小z老师最近在忙着搞毕业设计,由于有些毕业设计需要涉及到专业词汇,于是小z老师翻阅字典(只有小写字母组成,不会出现重复的单词),现在小z老师想对照着毕业设计上面的某些字符串并且以该字符为前缀(单词本身也是自己的前缀),统计字典上面有多少以该字符串为前缀的单词。"}},{"title":"输入","value":{"format":"HTML","content":"输入的第一个部分为字典(\u003cb\u003e\u003cfont color\u003dred\u003e单词个数不超过 $10^6$\u003c/font\u003e\u003c/b\u003e),每行输入一个单词,单词长度不超过$10$。一个空行表示字典部分结束。\u003cbr\u003e\n输入的第二部分为需要查询的字符串,每行输入一个字符串,处理到文件结束。"}},{"title":"输出","value":{"format":"HTML","content":"对于每个查询,给出以该字符串为前缀的单词的数量。"}},{"title":"样例 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e输入\u003c/th\u003e\n \u003cth\u003e输出\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003ebanana\nband\nbee\nabsolute\nacm\n\nba\nb\nband\nabc\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e2\n3\n1\n0\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}