Cod sursa(job #2803338)

Utilizator pachy2007Pachitanu Matei pachy2007 Data 19 noiembrie 2021 20:18:50
Problema Carte2 Scor 100
Compilator cpp-64 Status done
Runda Arhiva ICPC Marime 0.47 kb
#include <fstream>

using namespace std;
ifstream fin("carte2.in");
ofstream fout("carte2.out");
int a, b, c, d, e, n,i;

int main()
{
    fin >> n;

    for (i=0;i<n;i++)
    {
        fin >> a >> b >> c >> d >> e;
        if ((a < c && b < d) || (a < c && b < e) || (a < d && b < e) || (a < d && b < c) || (a < e && b < d) || (a < e && b < c))
            fout << "posibil"<<endl;
        else
            fout << "imposibil"<<endl;
    }

    return 0;
}