[ZJd260][UVA11455] Behold my quadrangle

題目:
http://zerojudge.tw/ShowProblem?problemid=d260
====================================================================

#include<cstdio>
#include<cmath>
typedef long long int LL;
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
LL a,b,c,d;
scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
if(a == b && b == c && c == d)
printf("square\n");
else if(a == c && b == d || a == b && c == d || a == d && b == c)
printf("rectangle\n");
else if(((a+b+c)<=d)||((a+b+d)<=c)||((a+c+d)<=b)||((b+c+d)<=a))
printf("banana\n");
else
printf("quadrangle\n");
}


return 0;
}

留言

這個網誌中的熱門文章

[ZJ]a227: 三龍杯 -> 河內之塔

建立 python 環境(windows 8)

[ZJ]b513: 判斷質數-商競103