Home > Back-end >  O great god see something wrong TAT
O great god see something wrong TAT

Time:09-23

[problem description]
Input from the standard input two integers (no more than 20 integers) in a row, all in the second group in the first group to delete the number in the set (i.e., two integer subtraction), and the smallest output,
[form] input
First enter the number of the first set of integers, then input the first set of integers, separated by Spaces. And then enter the second set of integer number, enter a second set of integers, separated by Spaces,
[] output form
Will all appear in the second set of Numbers in the first group to delete, by size order output, output integers separated with a space between,
[sample input]
8
5 4 3 7 8 9 6 1
4
5 2 8 10
[sample output]
1, 3, 4, 6, 7 and 9
[example]
The first set of integer number is 8, 5 1 4 3 8 July 9 6 respectively, the second integer number of 4, 5 2 8 of 10, respectively, will all appear in the second set of Numbers in the first group (that is, the Numbers 5 and 8) to delete the results after 1, 3, 4, 6, 7 and 9 (in order) since the childhood, every number in the middle with a blank space,
[scoring criteria]
The request that the output of integer expression calculation results, a total of five test points, upload C file named exam2. C,

#include
#include
Void main ()
{
Void counter (int a [], int len1, int [] b, int len2);
Int n, z;
int i,j;
The scanf (" % d % d ", & amp; N, & amp; Z);
Int * a=(int *) malloc (sizeof (int) * n);
Int * b=(int *) malloc sizeof (int) * z);
for(i=0; iThe scanf (" % d ", a + I);
}
for(i=0; i{
The scanf (" % d, b + I);
}
Counter (a, n, b, z);
}
Void counter (int a [], int len1, int [] b, int len2)
{
Int I, j, q, t, y, o, k, l, u, v.
U=59;
Int a w [60];
//to integrate two arrays
for(i=0; iW=[I] a [I];
J=I;
for(j=0; jW=b [I] [j];
//will be ordered array
For (q=0; QFor (t=0; TIf (w [t] & gt; W/t + 1)
{
[t] o=w;
W [t]=w (t + 1),
W/t + 1)=o;
}
//array to heavy
For (l=0; L{
For (k=l + 1; K<=u; K++)
{
If [k] [l]=w (w)
{
For (y=k; Y<=u; Y++)
{
W=w [y] [y + 1);
}
U -;
K -;

}
}
}
For (n=0; V<60; V++)
Printf (" % d ", w/v);
}
The compiler is not an error, but stopped working after a input

CodePudding user response:

Tracking KanSi debugged, where is it

CodePudding user response:

If [k] [l]=w (w)
This should be a mistake, your hand should be==
  • Related