{"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":"\u003cdiv class\u003d\"panel_content\"\u003e\n 统计给定文本文件中汉字的个数。\n\u003c/div\u003e"}},{"title":"提示","value":{"format":"HTML","content":"[Hint:]一个汉字的国际码占\u003cfont color\u003d\"red\"\u003e两个\u003c/font\u003e字节且都为\u003cfont color\u003d\"red\"\u003e负数\u003c/font\u003e~\u003cbr\u003e\n读取一行要包含空格\u003cbr\u003e\nC语言读取一行可用如下正则表达式\u003cbr/\u003e\nchar str1[300];\u003cbr/\u003e\n\u003cfont color\u003d\"red\"\u003escanf(\"%[^\\n]\", str1);\u003cbr/\u003e\u003c/font\u003e\nC艹读取一行可用\u003cbr/\u003e\nstring str;\u003cbr/\u003e\n\u003cfont color\u003d\"red\"\u003egetline(cin,str);\u003c/font \u003e"}},{"title":"Input","value":{"format":"HTML","content":"输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。"}},{"title":"Output","value":{"format":"HTML","content":"对于每一段文本,输出其中的汉字的个数,每个测试实例的输出占一行。\u003cbr\u003e\u003cbr\u003e[Hint:]一个汉字的国际码占两个字节且都为负数~\u003cbr\u003e\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e2\nWaHaHa! WaHaHa! 今年过节不说话要说只说普通话WaHaHa! WaHaHa!\n马上就要期末考试了Are you ready?\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e14\n9\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}