{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"请问从n*n的正方形左下角走到右上角且不越过对角线的情况总数模m的结果~"}},{"title":"Input","value":{"format":"MD","content":"第一行为一个整数t(0\u003ct\u003c\u003d100),表示数据组数。下面接着t行,每行两个数n,m(1\u003cn\u003c10^9,2\u003cm\u003c10^5)。m是质数。"}},{"title":"Output","value":{"format":"MD","content":"对于每组数据,输出答案模m的结果。如果对题意不是很清楚请看hint。"}},{"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\n2 5\n4 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"![title](CDN_BASE_URL/daa071d6425e8840a033f63d0d2089fd?v\u003d1725188343)\n\n这是4*4的情况,一共有14种情况"}}]}