UVA 11455 - Behold my quadrangle Shipu Ahamed - 01 Sep 2020 Problem PDFSolution:#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define pi 2*acos(0.0) using namespace std; int main() { int t,a,b,c,d; sc("%d",&t); while(t--) { sc("%d%d%d%d",&a,&b,&c,&d); if(a==b&&a==c&&a==d) { pf("square\n"); } else if( (a==b && c==d)||(b==c && d==a)||(a==c&& b==d)) { pf("rectangle\n"); } else if((a<=b+c+d)&&(b<=c+d+a)&&(c<=d+a+b)&&(d<=a+b+c)) { pf("quadrangle\n"); } else { pf("banana\n"); } } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11455/11455.cpp