All submissions for this problem are available.
Avishek owns a big movie hall. Everyday he get a houseful. But the problem is after online booking some people leave their seats. So seat number not remains continuous. Help him to find unreserved seats.
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains a single integer N denoting the number of total seat in the hall (starting from 1).The second line of each test case contains a single integer K (≤N) denoting the number of reserved seat. The next line contains K space-separated integers A1, A2, ..., AN denoting the reserved seats
- For each test case, output a single line containing N-K space separated integers denoting unreserved seats.
- 1 ≤ T ≤ 10
- 1 ≤ N,K ≤ 100000
- 1 ≤ Ai ≤ 100000
Input: 2 10 5 1 4 5 8 9 14 8 2 3 5 6 7 10 12 14 Output: 2 3 6 7 10 1 4 8 9 11 13
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.