Print? Description
David Deng accompanied Mr. true & Eddy for the interview.
David Deng is confident to go to Microsoft for an interview. A group of interviewers have a long queue, and each has an interview number.
At this moment, a big beauty KZ walked by him. David Deng fell in love with him at first sight. David Deng picked up his interview number N and left the interview team.
Input
The first act is an integer T, indicating that there are T groups of data.
Each group has three data rows:
The first line is an integer M, indicating that the original team has M members;
There are M integers separated by spaces in line 1, that is, the interview number of each person in the original team;
The interview number N of the third behavior David Deng.
Ensure that no number is the same and N is not greater than 10000
Output
The sequence of interview numbers of the team after David Deng leaves.
Sample Input
1
4
1 3 8 2
3
Description
David Deng accompanied Mr. true & Eddy for the interview.
David Deng is confident to go to Microsoft for an interview. A group of interviewers have a long queue, and each has an interview number.
At this moment, a big beauty KZ walked by him. David Deng fell in love with him at first sight. David Deng picked up his interview number N and left the interview team.
Input
The first act is an integer T, indicating that there are T groups of data.
Each group has three data rows:
The first line is an integer M, indicating that the original team has M members;
There are M integers separated by spaces in line 1, that is, the interview number of each person in the original team;
The interview number N of the third behavior David Deng.
Ensure that no number is the same and N is not greater than 10000
Output
The sequence of interview numbers of the team after David Deng leaves.
Sample Input
1
4
1 3 8 2
3
[Plain] # include <stdio. h>
Int SUM (int num );
Int main ()
{
Int I;
Int j;
Int n;
Int m;
Int p;
Int num [10001];
Scanf ("% d", & n );
While (n --)
{
Scanf ("% d", & m );
For (I = 0; I <m; I ++)
{
Scanf ("% d", & num [I]);
}
Scanf ("% d", & p );
For (I = 0; I <m-1; I ++)
{
If (num [I] = p)
{
For (j = I; j <m-1; j ++)
{
Num [j] = num [j + 1];
}
}
}
For (I = 0; I <m-1; I ++)
{
Printf ("% d", num [I]);
If (I <m-2)
{
Printf ("");
}
}
If (n> 0)
{
Printf ("\ n ");
}
}
Return 0;
}
# Include <stdio. h>
Int SUM (int num );
Int main ()
{
Int I;
Int j;
Int n;
Int m;
Int p;
Int num [10001];
Scanf ("% d", & n );
While (n --)
{
Scanf ("% d", & m );
For (I = 0; I <m; I ++)
{
Scanf ("% d", & num [I]);
}
Scanf ("% d", & p );
For (I = 0; I <m-1; I ++)
{
If (num [I] = p)
{
For (j = I; j <m-1; j ++)
{
Num [j] = num [j + 1];
}
}
}
For (I = 0; I <m-1; I ++)
{
Printf ("% d", num [I]);
If (I <m-2)
{
Printf ("");
}
}
If (n> 0)
{
Printf ("\ n ");
}
}
Return 0;
}