RECTANGL - Editorial

I thought so, but I guess I was fooled by the weak cases thanks to bring this to my notice and also I try not to use memory for trivial problems as such, but honestly sorting was the first thing came to my mind also.:smile:

1 Like

You aren’t saving any memory here I think. You have 4 variables declared. You will have exactly 4 declared variables in any case.

#include <stdio.h>

int main(void) {

int t,a,b,c,d;
scanf("%d",&t);
if(t>=1&&t<=1000)
{
while(t--)
{
    scanf("%d%d%d%d",&a,&b,&c,&d);
    if(a>=1&&b>=1&&c>=1&&d>=1&&a<=10000&&b<=10000&&c<=10000&&d<=10000)
    {
    if(a==b&&c==d)
    {
        printf("Yes\n");
    }
    else if(a==c&&b==d)
    {
        printf("Yes\n");
    }
    else if(a==d&&b==c)
    {
        printf("Yes\n");
    }
    else
    {
        printf("No\n");
    }
    }
}
}
return 0;

}

what’s wrong in my code