HDU 3903 Trigonometric Function

这题真难,并不会推理。。。

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;

long long a, b, c;
int p;

int main()
{
    int T;
    scanf("%d", &T);
    while (T--)
    {
        scanf("%lld%lld%lld", &a, &b, &c);
        scanf("%d%d%d", &p, &p, &p);
        long long x = (a + b + c)*(b + c - a)*(a + c - b)*(a + b - c);
        long long z = (long long)sqrt(x);
        if (z*z == x) printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

 

posted @ 2016-03-07 08:20  Fighting_Heart  阅读(195)  评论(0编辑  收藏  举报