#include<cstdio> #include<algorithm> using namespace std; int main() { int t; scanf("%d",&t); while (t--) { unsigned long long int s[4]; for (int i=0;i<4;i++) scanf("%llu",&s[i]); sort(s,s+4); if (s[0]==s[1]&&s[1]==s[2]&&s[2]==s[3]) printf("square\n"); else if (s[0]==s[1] && s[2]==s[3]) printf("rectangle\n"); else if (s[0]+s[1]+s[2]>=s[3]) printf("quadrangle\n"); else printf("banana\n"); } return 0; }
Monday, April 25, 2016
UVA 11455. : Behold my quadrangle -Solution
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment