链接http://acm.swust.edu.cn/problem/1159/
海伦公式http://baike.baidu.com/view/1279.htm
#include <stdio.h> #include <math.h> #define PI 3.14 int main() { double r,a,b,c,p; double s_circle,s_triangle; while(scanf("%lf %lf %lf %lf",&r,&a,&b,&c)!=EOF) { s_circle=PI*r*r; p=(a+b+c)/2; s_triangle=sqrt(p*(p-a)*(p-b)*(p-c)); if(s_circle>s_triangle) { printf("A\n"); } else { printf("B\n"); } } return 0; }