http://acm.hit.edu.cn/hoj/problem/view?id=2760
易知△DCE为正三角形
S(DFE)=S扇DCE-S△DCE
S(AEFD)=S扇ADE-S(DFE)
S=a^2-4*S(AEFD)
公式:S=(pi/3 + 1 -√3)*a^2
#include <stdio.h>
#include <math.h>
int main()
{
double a, s;
const double pi=acos(-1);
while (scanf("%lf", &a) != EOF)
{
s = (pi / 3 + 1 - sqrt(3) ) * a * a;
printf("%.3lf\n", s);
}
return 0;
}