Cod sursa(job #1709062)

Utilizator oldscotchUPB Old Scotch oldscotch Data 28 mai 2016 10:45:13
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.69 kb
#include <cstdio>

using namespace std;
int main()
{
    int a, b, c, d, e;
    freopen("carte2.in", "r", stdin);
    freopen("carte2.out", "w", stdout);
    int T;
    scanf("%d", &T);
    while(T--)
    {
        int ok = 0;
        scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
        if(c > a && d > b)
            ok = 1;
        if(d > a && c > b)
            ok = 1;
        if(c > a && e > b)
            ok = 1;
        if(e > a && c > b)
            ok = 1;
        if(d > a && e > b)
            ok = 1;
        if(e > a && d > b)
            ok = 1;
        if(ok == 1)
            printf("posibil\n");
        else printf("imposibil\n");
    }

    return 0;
}