In this problem, what is the meaning of "as well as the reversal of the bus, take place immediately and this time can be neglected." in this problem. I can two possibilities. 1, back the bus to collect pupils does not last any (immediate). 2, turn the car back nothing lasts for (immediate), but the movement to pick up a pupil (bakc) is counted in time.
Thanks for clearing my doubt.
I'm trying to understand the problem's solution.
int main() {
int n, k;
D l, v1, v2;
cin >> n >> l >> v1 >> v2 >> k;
int b = (n + k - 1) / k;
cout<< "("<< n<< "+"<< k <<"- 1)"<< "/"<< k<< "= "<< b<< endl;
double den = (2 * (b - 1) * v1 / (v1 + v2)) + 1;
cout<<"(2 * ("<<b <<"- 1) * "<<v1 <<"/ ("<<v1 <<"+"<< v2<<")) +"<< 1 << "=" << den<<endl;
double x = l / den;
cout<< l <<"/ "<<den<<"="<< x<< endl;
double ans = x / v2 + (l - x) / v1;
cout<< x <<"/"<< v2 <<"+" <<"("<<l <<"-"<< x<<") / "<<v1 << "="<< ans<< endl;
printf("%0.9f\n", ans);
return 0;
}