{"raw_statement":[{"iden":"problem statement","content":"There are $N$ people, numbered from $1$ to $N$, who participated in a round-trip race between two points. The following information is recorded about this race.\n\n*   The **outward** times of any two people were different, and person $i$ $(1 \\leq i \\leq N)$ had the $i$\\-th fastest outward time.\n*   The **round-trip** times (the sum of the outward and return times) of any two people were different, and person $i$ $(1 \\leq i \\leq N)$ had the $P_i$\\-th fastest round-trip time.\n*   The person (or persons) with the fastest **return** time was awarded the **fastest return award**.\n\nHere, $P_1, P_2, \\dots, P_N$ is a permutation of $1, 2, \\dots, N$.\nHow many people could have received the **fastest return award**?\nThere are $T$ test cases. Answer each of them."},{"iden":"constraints","content":"*   $1 \\leq T \\leq 500$\n*   $2 \\leq N \\leq 10^3$\n*   $P_1, P_2, \\dots, P_N$ is a permutation of $1, 2, \\dots, N$.\n*   All input values are integers.\n*   The sum of $N$ over all test cases in a single input is at most $10^3$."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$T$\n$\\mathrm{case}_1$\n$\\vdots$\n$\\mathrm{case}_T$\n\nEach test case, $\\mathrm{case}_i\\ (1 \\leq i \\leq T)$, is given in the following format:\n\n$N$\n$P_1$ $P_2$ $\\cdots$ $P_N$"},{"iden":"sample input 1","content":"3\n2\n2 1\n4\n1 2 3 4\n20\n13 2 7 1 5 9 3 4 12 10 15 6 8 14 20 16 19 18 11 17"},{"iden":"sample output 1","content":"1\n4\n7\n\n*   In the first test case, two people participated in the race, and person $2$ overtook person $1$ on the return leg. In this case, the fastest return award is awarded to person $2$.\n*   In the second test case, the rankings did not change on the return leg, so any person could have received the fastest return award."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}