Cod sursa(job #1709008)

Utilizator VladTiberiuMihailescu Vlad Tiberiu VladTiberiu Data 28 mai 2016 10:33:30
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.6 kb
#include <bits/stdc++.h>

#define NMax 100000
#define ll long long
using namespace std;
ifstream f("carte2.in");
ofstream g("carte2.out");

ll t,n,nr;
ll a,b,c,d,e,baza1,baza2,baza3,baza;

int main()
{
    f >> t;
    for(ll count = 1; count <= t; ++count){
        f >> a >> b >> c >> d >> e;
        if((a < c && b < d) ||
           (a < d && b < c) ||
           (a < c && b < e) ||
           (a < e && b < c) ||
           (a < e && b < d) ||
           (a < d && b < e))
            g << "posibil"<< '\n';
        else
            g << "imposibil"<<'\n';
    }
    return 0;
}