Cod sursa(job #3281326)

Utilizator tudoor_balasescuBalasescu Tudor tudoor_balasescu Data 1 martie 2025 09:48:13
Problema Carte2 Scor 100
Compilator cpp-64 Status done
Runda Arhiva ICPC Marime 0.67 kb
#include <fstream>

using namespace std;
ifstream fin("carte2.in");
ofstream fout("carte2.out");
int q,c1,c2,b1,b2,b3;
int main()
{
    fin>>q;
    while(q--)
    {
        fin>>c1>>c2>>b1>>b2>>b3;
        if(c1<b1 && c2<b2)
            fout<<"posibil"<<'\n';
        else if(c1<b1 && c2<b3)
            fout<<"posibil"<<'\n';
        else if(c1<b2 && c2<b1)
            fout<<"posibil"<<'\n';
        else if(c1<b2 && c2<b3)
            fout<<"posibil"<<'\n';
        else if(c1<b3 && c2<b1)
            fout<<"posibil"<<'\n';
        else if(c1<b3 && c2<b2)
            fout<<"posibil"<<'\n';
        else fout<<"imposibil"<<'\n';
    }
    return 0;
}