#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
const double PI = 2 * acos(0);
int main()
{
double a, b, c;
#ifndef ONLINE_JUDGE
ifstream cin("uva_in.txt");
#endif
cout.precision(4);
while (cin >> a >> b >> c) {
double cos = (b * b + c * c - a * a) / (2 * b * c);
double sin = sqrt(1 - cos * cos);
double R = a / sin / 2;
double p = 0.5 * (a + b + c);
double area1 = PI * R * R;
double area2 = sqrt(p * (p - a) * (p - b) * (p - c));
double r = area2 / p;
double area3 = PI * r * r;
cout << fixed << area1 - area2 << " " << area2 - area3 << " " << area3 << endl;
}
return 0;
}
UVa11152 - Colourful Flowers
最新推荐文章于 2019-06-10 19:30:47 发布