{"raw_statement":[{"iden":"background","content":"对应的选择、判断题：<https://ti.luogu.com.cn/problemset/1176>"},{"iden":"statement","content":"小 A 有一个 $n$ 行 $m$ 列的矩阵 $A$。\n\n小 A 认为一个 $2 \\times 2$ 的矩阵 $D$ 是好的，当且仅当 $D_{1,1} \\times D_{2,2} = D_{1,2} \\times D_{2,1}$。其中 $D_{i,j}$ 表示矩阵 $D$ 的第 $i$ 行第 $j$ 列的元素。\n\n小 A 想知道 $A$ 中有多少个好的子矩阵。"},{"iden":"input","content":"第一行，两个正整数 $n, m$。\n\n接下来 $n$ 行，每行 $m$ 个整数 $A_{i,1}, A_{i,2}, \\ldots, A_{i,m}$。"},{"iden":"output","content":"一行，一个整数，表示 $A$ 中好的子矩阵的数量。"},{"iden":"note","content":"### 样例解释\n\n样例中好的子矩阵如下：\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/lcdtefnp.png)\n\n### 数据范围\n\n对于所有测试点，保证 $1\\leq n\\leq 500$，$1\\leq m\\leq 500$，$-100\\leq A_{i,j}\\leq 100$"}],"translated_statement":null,"sample_group":[["3 4\n1 2 1 0\n2 4 2 1\n0 3 3 0","2"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}