Home > Back-end >  VC operation error
VC operation error

Time:09-16

#include
Void GreedySelector (int n, int [s], [], int f int A [])
{
A [0]=1;
Int I, j=0;
for(i=1; I{
If (s [I] & gt;=f [j])
{
A [I]=true;
J=I;
}
The else
{
A [I]=0;
}
}
}
Void main ()
{
Int I, n=11;
Int [] s=,3,0,5,3,5,6,8,8,2,12 {1};
Int f []=,5,6,7,8,9,10,11,12,13,14 {4};
Int A, [11].
GreedySelector (n, s, f, A);
Printf (" can arrange the activity of the serial number: \ n ");
for(i=0; I{
If (A [I]==1)
Printf (" % d activities are arranged [start time % d % d - the end of the time] \ n ", I=1, s [I], [I] f);
}
printf("\n");
}

CodePudding user response:

Single step debugging, positioning error to run, if is the end result does not conform to, please consider to write their own correct logic function
Prev:des
  • Related