{"raw_statement":[{"iden":"problem statement","content":"You have a grid with $H$ rows from top to bottom and $W$ columns from left to right. We denote by $(i, j)$ the square at the $i$\\-th row from the top and $j$\\-th column from the left. $(i,j)\\ (1\\leq i\\leq H,1\\leq j\\leq W)$ has an integer $A _ {i,j}$ between $1$ and $N$ written on it.\nYou are given integers $h$ and $w$. For all pairs $(k,l)$ such that $0\\leq k\\leq H-h$ and $0\\leq l\\leq W-w$, solve the following problem:\n\n*   If you black out the squares $(i,j)$ such that $k\\lt i\\leq k+h$ and $l\\lt j\\leq l+w$, how many distinct integers are written on the squares that are not blacked out?\n\nNote, however, that you do not actually black out the squares (that is, the problems are independent)."},{"iden":"constraints","content":"*   $1 \\leq H,W,N \\leq 300$\n*   $1 \\leq h \\leq H$\n*   $1 \\leq w \\leq W$\n*   $(h,w)\\neq(H,W)$\n*   $1 \\leq A _ {i,j} \\leq N\\ (1\\leq i\\leq H,1\\leq j\\leq W)$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$H$ $W$ $N$ $h$ $w$\n$A _ {1,1}$ $A _ {1,2}$ $\\dots$ $A _ {1,W}$\n$A _ {2,1}$ $A _ {2,2}$ $\\dots$ $A _ {2,W}$\n$\\vdots$\n$A _ {H,1}$ $A _ {H,2}$ $\\dots$ $A _ {H,W}$"},{"iden":"sample input 1","content":"3 4 5 2 2\n2 2 1 1\n3 2 5 3\n3 4 4 3"},{"iden":"sample output 1","content":"4 4 3\n5 3 4\n\nThe given grid is as follows:\n![image](https://img.atcoder.jp/abc278/d3542563ea2e11fda78c3307c0a2b0fe.png)\nFor example, when $(k,l)=(0,0)$, four distinct integers $1,3,4$, and $5$ are written on the squares that are not blacked out, so $4$ is the answer."},{"iden":"sample input 2","content":"5 6 9 3 4\n7 1 5 3 9 5\n4 5 4 5 1 2\n6 1 6 2 9 7\n4 7 1 5 8 8\n3 4 3 3 5 3"},{"iden":"sample output 2","content":"8 8 7\n8 9 7\n8 9 8"},{"iden":"sample input 3","content":"9 12 30 4 7\n2 2 2 2 2 2 2 2 2 2 2 2\n2 2 20 20 2 2 5 9 10 9 9 23\n2 29 29 29 29 29 28 28 26 26 26 15\n2 29 29 29 29 29 25 25 26 26 26 15\n2 29 29 29 29 29 25 25 8 25 15 15\n2 18 18 18 18 1 27 27 25 25 16 16\n2 19 22 1 1 1 7 3 7 7 7 7\n2 19 22 22 6 6 21 21 21 7 7 7\n2 19 22 22 22 22 21 21 21 24 24 24"},{"iden":"sample output 3","content":"21 20 19 20 18 17\n20 19 18 19 17 15\n21 19 20 19 18 16\n21 19 19 18 19 18\n20 18 18 18 19 18\n18 16 17 18 19 17"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}