~cpp #include <iostream> #include <cmath> using namespace std; void process(double l, double w) { double max_v = (2*(w+l) - sqrt(pow(2*(w+l), 2) - (12*w*l)))/12; double min_v = l < w ? l : w; cout << max_v << " " << 0.0 << " " << min_v/2 <<endl; } int main() { cout.setf(ios::fixed, ios::floatfield); cout.setf(ios::showpoint); cout.precision(3); double l, w; while(cin >> l >> w) { process(l, w); } return 0; }