|
|
вернуться в форумWA #11 What's wrong with my function? long double f(int x) { if (x>1) { long double t; if (((k-1)*v+15)>((n-x)*u)) t=(k-1)*v+15; else t=(n-x)*u; return t+(x-1)*v+5+(x-1)*v; } else { return (n-1)*u; } } People give me some tests. Edited by author 10.04.2008 19:46 Re: WA #11 Послано black 6 июл 2008 02:25 Your source is right. But please don't remember that "If there are several equivalent variants, output such one in which Petr will go by foot the smaller distance." |
|
|