Cod sursa(job #2741237)

Utilizator ionanghelinaIonut Anghelina ionanghelina Data 15 aprilie 2021 18:58:16
Problema Carte2 Scor 100
Compilator cpp-64 Status done
Runda Arhiva ICPC Marime 0.81 kb
#include<bits/stdc++.h>
using namespace std;
int t;

inline void solve(int a,int b,int c,int d,int e)
{
    if(a<c && b<d)
    {
        printf("posibil\n");
        return;
    }

    if(b<c && a<d)
    {
        printf("posibil\n");
        return;
    }

    if(a<c && b<e)
    {
        printf("posibil\n");
        return;
    }

    if(b<c && a<e)
    {
        printf("posibil\n");
        return;
    }
    if(a<d && b<e)
    {
        printf("posibil\n");
        return;
    }

    if(b<d && a<e)
    {
        printf("posibil\n");
        return;
    }

    printf("imposibil\n");

}
int a,b,c,d,e;
int main()
{
    freopen("carte2.in","r",stdin);
    freopen("carte2.out","w",stdout);


    scanf("%d",&t);


    while(t--)
    {
        scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);

        solve(a,b,c,d,e);
    }
    return 0;
}