No older revisions available
No older revisions available
~cpp #include <iostream> #include <math.h> using namespace std; void process(double L, double W) { cout.setf(ios::fixed, ios::floatfield); cout.setf(ios::showpoint); cout.precision(3); double a = 12; double b = -4*L -4*W; double c = L*W; double min = L; if(W < L) min = W; cout << -b/2.0/a - sqrt(b*b -4*a*c)/2.0/a << " " << 0.0 << " " << min/2.0 << endl; } int main() { double L,W; while(cin >> L >> W) { process(L,W); } return 0; }