cook your code here
input_cases = raw_input();
input_cases = int(input_cases);
for _ in range(input_cases):
total_jobs_num,finished_jobs_num = map(int,raw_input().split(" "));
total_jobs = range(1,total_jobs_num+1);
finished_jobs = map(int,raw_input().split(" "));
for item in finished_jobs:
total_jobs.remove(item);
chef_jobs = [total_jobs[i] for i in range(0,len(total_jobs)) if i%2==0]
assistant_jobs = [total_jobs[i] for i in range(0,len(total_jobs)) if i%2!=0]
print " ".join(map(str,chef_jobs))
print " ".join(map(str,assistant_jobs))
I’m not sure since I don’t know the constraints but the most prone to NZEC is the input (trailing spaces after the data) seconded by the output (uncontrolled print of data). If you include the constraints or indicate on what problem it is for, I’ll give you an update.