Help Problem A div 1, #364

Правка en5, от CazadorDivino, 2016-07-24 03:41:23

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;
}
Теги math, #364

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en7 Английский CazadorDivino 2016-07-24 03:43:54 23
en6 Английский CazadorDivino 2016-07-24 03:42:48 1 Tiny change: 'eglected._ " in this ' -> 'eglected._" in this '
en5 Английский CazadorDivino 2016-07-24 03:41:23 5
en4 Английский CazadorDivino 2016-07-24 03:40:44 4
en3 Английский CazadorDivino 2016-07-24 03:40:11 997
en2 Английский CazadorDivino 2016-07-24 02:33:31 3
en1 Английский CazadorDivino 2016-07-24 02:33:13 515 Initial revision (published)