forked from daiwb/Algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path162.cpp
More file actions
34 lines (29 loc) · 762 Bytes
/
162.cpp
File metadata and controls
34 lines (29 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//ac
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
double ff(double a1, double a2, double a3, double b1, double b2, double b3, double c1, double c2, double c3) {
double ret = 0;
ret += a1 * b2 * c3;
ret += a2 * b3 * c1;
ret += a3 * b1 * c2;
ret -= a1 * b3 * c2;
ret -= a2 * b1 * c3;
ret -= a3 * b2 * c1;
return ret;
}
double s(double a) {
return a * a;
}
int main() {
double a, b, c, d, e, f;
scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
double v = ff(2 * s(a), s(a) + s(b) - s(d), s(a) + s(c) - s(e),
s(a) + s(b) - s(d), 2 * s(b), s(b) + s(c) - s(f),
s(a) + s(c) - s(e), s(b) + s(c) - s(f), 2 * s(c));
v = sqrt(2.0 * v / 24.0 / 24.0);
//printf("%lf\n", v);
printf("%.4lf\n", v);
return 0;
}