{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"Anoyer最近开始学习英语。现在他需要记住如何写英文字母。他不确定其中的一些,所以他决定训练一下。\n\n他找到了一张方纸,开始在那里写任意英文字母。最后Anoyer写了n行,每行包含m个字符。因此,他得到一个矩形的n×m表,表中的每个单元格都包含一些英文字母。让我们用从1到n的整数从上到下对表格行进行编号,并使用从左到右的整数从1到m的整数。\n\n之后,Anoyer看着生成的矩形表,想知道有多少个子表符合以下两个条件:\n\n子表最多包含k个带有“a”字母的单元格;\n子表的所有四个角单元中的字母都是相等的。\n形式上,子表的定义如下。它由四个整数x1,y1,x2,y2定义,使得1≤x1\u003cx2≤n,1≤y1\u003cy2≤m。然后子表包含所有这些单元格(x,y)(x是行号,y是列号),对于这些单元格,下面的不等式保持x1≤x≤x2,y1≤y≤y2。表格的角单元格是单元格(x1,y1),(x1,y2),(x2,y1),(x2,y2)。\n\nAnoyer在给一张纸写信后已经太累了。这就是他要求你计算他感兴趣的价值的原因。"}},{"title":"Input","value":{"format":"MD","content":"\n第一行包含三个整数n,m,k(2≤n,m≤400;0≤k≤n*m)。\n\n接下来的n行每行包含m个字符 - 给定的表。 表格的每个字符都是一个小写的英文字母。"}},{"title":"Output","value":{"format":"MD","content":"\n打印一个整数 ,子表的数量。"}},{"title":"Examples","value":{"format":"MD","content":"#### 样例1\nInput:\n3 4 4\naabb\nbaab\nbaab\n\nOutput:\n2\n#### 样例2\nInput:\n4 5 1\nababa\nccaca\nccacb\ncbabc\n\nOutput:\n1"}},{"title":"Note","value":{"format":"MD","content":"第一个样本中有两个合适的子表:第一个左上角是单元格(2,2),右下角是单元格(3,3),第二个左上角是单元格(2,1)和右下角是单元格(3,4)。"}}]}