{"raw_statement":[{"iden":"statement","content":"Guangdong Province is one of the earliest province in China which holds its own provincial collegiate programming contest. Sun Yat-sen University hosted the first Guangdong Collegiate Programming Contest in year $2003$. After that, other universities in Guangdong, such as South China Agricultural University, South China University of Technology and South China Normal University, also hosted the contest. The contest is held once a year except for year $2020$ due to the epidemic. In year $2023$, Shenzhen Technology University will host the twentieth Guangdong Collegiate Programming Contest. We are looking forward to seeing participants' outstanding performance!\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/nvct1s9o.png)\n\nIn another world, a programming contest has been held once a year since year $y_1$, except for the $n$ years $s_1, s_2, \\cdots, s_n$ when it was not held due to special reasons.\n\nCalculate the number of times the competition has been held up to year $y_2$ (inclusive)."},{"iden":"input","content":"There are multiple test cases. The first line of the input contains an integer $T$ ($1 \\le T \\le 20$) indicating the number of test cases. For each test case:\n\nThe first line contains an integer $y_1$ ($1970 \\le y_1 \\le 9999$) indicating the first year when the contest was held.\n\nThe second line first contains an integer $n$ ($0 \\le n \\le 100$) indicating the number of years the contest was not held. Then $n$ integers $s_1, s_2, \\cdots, s_n$ ($y_1 < s_i \\le 9999$) follow, indicating the years when the contest was not held. These years are given in increasing order and have no duplicates.\n\nThe third line contains an integer $y_2$ ($y_1 \\le y_2 \\le 9999$). It's guaranteed that $y_2$ is not a year when the contest was not held."},{"iden":"output","content":"For each test case output one line containing one integer, indicating the number of times the competition has been held up to year $y_2$ (inclusive).\n"},{"iden":"note","content":"For the first sample test case, as described in the problem description, the answer is $20$.\n\nFor the second sample test case, because year $2003$ is the $1$-st year when the contest was held, the answer is $1$.\n\nFor the third sample test case, because the contest was held every year, the answer is $3456 - 2345 + 1 = 1112$.\n\nFor the fourth sample test case, the first $5$ years when the contest was held is $3000$, $3002$, $3005$, $3006$ and $3007$. So the answer is $5$."}],"translated_statement":null,"sample_group":[["4\n2003\n1 2020\n2023\n2003\n1 2020\n2003\n2345\n0\n3456\n3000\n4 3001 3003 3004 3008\n3007","20\n1\n1112\n5"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}