|
|
back to boardWA #11 Posted by Russtam 10 Apr 2008 15:58 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 Posted by black 6 Jul 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." |
|
|