{"raw_statement":[{"iden":"statement","content":"You are given an array of $n$ integers (a1, a2, a3, ....... an)\n\nYou have to find the number of pairs such that a[i] xor a[j] = a[i]\n\nFirst line has a single integer $t$, number of tests [1 <= $t$ <= 10]\n\nFirst line of each test has a single integer $n$, size of array [1 <= $n$ <= 100]\n\nSecond line of each test has $n$ integers, the array elements [0 <= $a [ i ]$ <= 1e9]\n\nIt is guaranteed that sum of n among all tests do not exceed 100\n\nFor each test, print a single integer, the number of pairs\n\n"},{"iden":"input","content":"First line has a single integer $t$, number of tests [1 <= $t$ <= 10]First line of each test has a single integer $n$, size of array [1 <= $n$ <= 100]Second line of each test has $n$ integers, the array elements [0 <= $a [ i ]$ <= 1e9]It is guaranteed that sum of n among all tests do not exceed 100"},{"iden":"output","content":"For each test, print a single integer, the number of pairs"}],"translated_statement":[{"iden":"statement","content":"给你一个正整数序列。一个正整数序列被称为 #cf_span[Rasta - made]，当且仅当其中任意两个相邻元素互质。\n\n对一个序列执行一次 #cf_span[Rasta - making] 操作，是指选择一对不互质的相邻元素，并将它们同时除以它们的一个公共质因数。例如，我们可以通过对序列执行一次操作将其变为 。\n\n一个序列的 #cf_span[Phoulady] 数是指将其变为 #cf_span[Rasta - made] 序列所需的最少 #cf_span[Rasta - making] 操作次数。\n\n一个序列的 #cf_span[Construction] 数是指通过执行 0 次或多次 #cf_span[Rasta - making] 操作所能得到的不同序列的数量。\n\n我们用 #cf_span[F] 表示 #cf_span[Phoulady] 数，用 #cf_span[S] 表示 #cf_span[Construction] 数。\n\n在所有子任务中：\n\n子任务：\n\n每个子任务包含一个测试用例。\n\n输入包含两个整数 #cf_span[n] 和 #cf_span[M]。\n\n请输出答案对 #cf_span[109 + 7] 取模的结果，占一行。\n\n"},{"iden":"input","content":"每个子任务包含一个测试用例。输入包含两个整数 #cf_span[n] 和 #cf_span[M]。"},{"iden":"output","content":"请输出答案对 #cf_span[109 + 7] 取模的结果，占一行。"},{"iden":"examples","content":""}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of students and marks.  \nLet $ X = (x_1, x_2, \\dots, x_n) $ be the sequence of mark distances, with $ 1 \\leq x_1 < x_2 < \\dots < x_n \\leq 12345 $.  \nLet $ C = (c_1, c_2, \\dots, c_n) $ be the sequence of student skill levels, with $ 1 \\leq c_i \\leq 12345 $.\n\n**Constraints**  \nEach student $ i $ can successfully shoot from a mark at distance $ x_j $ if and only if $ c_i \\geq x_j $.  \nEach mark must be assigned to exactly one student, and each student to exactly one mark (bijection).\n\n**Objective**  \nDetermine whether there exists a permutation $ \\sigma \\in S_n $ such that for all $ i \\in \\{1, \\dots, n\\} $:  \n$$\nc_i \\geq x_{\\sigma(i)}\n$$","simple_statement":null,"has_page_source":false}