Cod sursa(job #1710426)

Utilizator fanache99Constantin-Buliga Stefan fanache99 Data 28 mai 2016 22:29:55
Problema Carte2 Scor 100
Compilator cpp Status done
Runda Arhiva ICPC Marime 0.53 kb
#include<cstdio>
inline bool ok(int a,int b,int x,int y){
    if(((a<x)&&(b<y))||((a<y)&&(b<x)))
        return true;
    return false;
}
int main(){
    freopen("carte2.in","r",stdin);
    freopen("carte2.out","w",stdout);
    int a,b,c,d,e,tests,test;
    scanf("%d",&tests);
    for(test=1;test<=tests;test++){
        scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
        if((ok(a, b, c, d))||(ok(a,b,c,e))||(ok(a,b,d,e)))
            printf( "posibil\n");
        else
            printf( "imposibil\n");
    }
    return 0;
}