{"trustable":false,"sections":[{"title":"statement","value":{"format":"HTML","content":"has two lengths of $p+1$ and $q+1$ of sequences, each of which has individual elements that are different from each other and are $1 - n^2$\n integers between. The first element of both sequences is $1$ .\nFind the length of longest common subsequence about $string_A$ and $string_B$"}},{"title":"输入格式","value":{"format":"HTML","content":"First line contain one integer $T (T \\leq 10)$ ---the number of testcase.\nSecond line contain three integers $n, p, q(2 \\leq n \\leq 250 、1 \\leq p,q\\leq n^2)$--- The same as described in the statement\u003cbr/\u003e\nThird line contain sequence $A$,the first number is 1 and its elements are two different and all are integers between $1-n^2$.\u003cbr/\u003e\nFourth line contain sequence $B$,the first number is 1 and its elements are two different and all are integers between $1-n^2$.\u003cbr/\u003e"}},{"title":"输出格式","value":{"format":"HTML","content":" Print the length of longest common subsequence about $string_A$ and $string_B$"}},{"title":"input","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\u003e\u003cpre\u003e\n1\n3 6 7\n1 7 5 4 8 3 9\n1 4 3 5 6 2 8 9\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e\nCase 1: 4\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}