{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv\u003e\n Bobo 在 ICPCCamp 买了一块 n×m 的土地,其中有些格子是障碍。\n \u003c/div\u003e \n \u003cdiv\u003e\n 他想选择两个矩形区域,建造两座房子。 很明显,用于盖房子的区域不能包含障碍。同时,两个区域不能相交(但是可以相邻)。\n \u003c/div\u003e \n \u003cdiv\u003e\n Bobo 想知道所有可能不同方案的数量除以 (10\n \u003csup\u003e9\u003c/sup\u003e+7) 的余数。\n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv\u003e\n 输入包含不超过 10 组数据。\n \u003c/div\u003e \n \u003cdiv\u003e\n 每组数据的第一行包含两个整数 n,m (1≤n,m≤10\n \u003csup\u003e3\u003c/sup\u003e).\n \u003c/div\u003e \n \u003cdiv\u003e\n 接下来 n 行中的第 i 行包含一个长度为 m 的字符串 s\n \u003csub\u003ei\u003c/sub\u003e。s\n \u003csub\u003ei\u003c/sub\u003e 的第 j 位是 0 则表示第 i 行第 j 列的格子是空地,是 1 则表示该格子是障碍。\n \u003c/div\u003e \n \u003cdiv\u003e\u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv\u003e\n 对于每组数据,输出一个整数表示所求的值。\n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2 2\n00\n01\n3 4\n1000\n0001\n0100\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e5\n160\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e"}}]}