Cod sursa(job #1708931)

Utilizator team_nameUPB Banu Popa Visan team_name Data 28 mai 2016 10:16:41
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.56 kb
#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;

int t, a, b, c, d, e;

int main()
{
    freopen("carte2.in", "r", stdin);
    freopen("carte2.out", "w", stdout);

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

        if((a < c && b < d) || 
           (a < d && b < c) ||
           (a < d && b < e) || 
           (a < e && b < d) || 
           (a < e && b < c) || 
           (a < c && b < e))
            printf("posibil\n");
        else 
            printf("imposibil\n");
    }
}