{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eGiven an $n\\times n$ chessboard, the rows and columns are numbered from $1$ to $n$ respectively. RDC, a handsome juvenile, punched several holes in specified locations, the $i$-th of which locates at $(x_i,y_i)$.\u003c/p\u003e\n\u003cp\u003eRDC also has a pet Pork Ribs dragon whose name is PRD.Now, PRD is drunk and was left on the chessboard at the cell $(r,c)$. It will walk randomly and move to an adjacent cell every second with equal probability. Here two cells are adjacent if they share a common edge. PRD will fall into the hole and start to sleep when it arrives at a cell with a punched hole.\u003c/p\u003e\n\u003cp\u003eNow, RDC wonders the expected time consumption of his pet for each hole that his pet will finally stay in.\u003c/p\u003e\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line contains an integer $T$ ($1\\leq T\\leq 20$), indicating the number of test cases.\u003c/p\u003e\n\u003cp\u003eFor each test case, the first line contains two integers $n$ and $k$ ($2\\leq n\\leq 200,1\\leq k\\leq 200$) indicating the size of the given chessboard and the number of holes. Then $k$ lines follow, the $i$-th of which contains two integers $x_i$ and $y_i$ ($1\\leq x_i,y_i\\leq n$) indicating the location of the $i$-th hole. The last line of each test case contains two integers $r$ and $c$ ($1\\leq r,c\\leq n$) described as above.\u003c/p\u003e\n\u003cp\u003eWe guarantee that PRD is not locating at a hole initially, and all given holes are distinct. We also guarantees that $\\max(n,k)\u0026gt;5$ hold in at most one test case.\u003c/p\u003e\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each test case, output the expected time consumption (in seconds) for each hole in order in a single line.\u003c/p\u003e\n\u003cp\u003eMore precisely, if a hole is reachable and the reduced fraction of the expected time consumption is $\\frac{p}{q}$, you should output the minimum non-negative integer $r$ such that $q \\cdot r \\equiv p \\pmod{10^9+7}$. You may safely assume that such $r$ always exists in all test cases. If a hole is unreachable, output \u003ccode\u003eGG\u003c/code\u003e at the right place.\u003c/p\u003e"}},{"title":"Sample 1","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\u003e2\n3 3\n1 1\n1 2\n2 1\n2 2\n5 3\n5 3\n4 1\n3 2\n4 5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eGG 4 4\n669185882 381533358 341349117\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e"}}]}