頑張って計算する
class Subway2 { public: double minTime(int L, int A, int V) { const double l = L; const double a = A; const double v = V; double t1 = sqrt(l / a); if (a * t1 <= V) return t1 * 2.0; double t2 = v / a; return (((l / 2.0) - (0.5 * a * t2 * t2)) / v + t2) * 2.0; } };