Home > Back-end >  Oj topic, but why ac
Oj topic, but why ac

Time:02-12




Below is the code:
# include & lt; Stdio. H>
Int main ()
{
Int a [1000], [1000] b, c [2000], I, j, k, m, n;
Void f (int * s, int n);
The scanf (" % d ", & amp; N);
for(i=0; iThe scanf (" % d ", & amp; M);
for(i=0; iFor (I=0, k=0; i{
for(j=0; J{
If (a [I]==b [j])
{
C=[k++] a [I];
break;
}
}
}
If (k> 0) f (c, k);
for(i=0; iFor (j=0, k=I; J{
for(i=0; i{
If ([j] a [I]==b) break;
}
If (i> C=n) [j] [k++]=b;
}
If (k> 0) f (c, k);
For (I=0, k=0; i{
for(j=0; J{
If ([j] a [I]==b) break;
}
If (j> M)=c=[k++] a [I];
}
If (k> 0) f (c, k);
return 0;
}
Void f (int * s, int x)
{
Int temp, I, j;
for(i=0; i{
for(j=0; J{
If (s [j] & gt; S [m + 1])
{
Temp=s [j];
S [j]=s [j + 1);
S=\ [j + 1];
}
}
}
for(i=0; iPrintf (" % d \ n ", s [I]);
}

CodePudding user response:

Sample output do not tally with the topic request, pass

CodePudding user response:

reference 1st floor forever74 response:
sample output do not tally with the topic request, pass

Output is consistent, not letter you run it and see
  • Related