Cod sursa(job #2455937)

Utilizator alex_HarryBabalau Alexandru alex_Harry Data 13 septembrie 2019 09:45:09
Problema Carte2 Scor 100
Compilator cpp-64 Status done
Runda Arhiva ICPC Marime 0.73 kb
#include <fstream>
using namespace std;
ifstream f("carte2.in");
ofstream g("carte2.out");
int A, B, C, D, E;
void Solve(){
    if(A < C && B < D){
        g << "posibil\n";
        return;
    }
    if(A < D && B < C){
        g << "posibil\n";
        return;
    }
    if(A < C && B < E){
        g << "posibil\n";
        return;
    }
    if(A < E && B < C){
        g << "posibil\n";
        return;
    }
    if(A < D && B < E){
        g << "posibil\n";
        return;
    }
    if(A < E && B < D){
        g << "posibil\n";
        return;
    }
    g << "imposibil\n";
}
int main()
{
    int T;
    f >> T;
    while(T--){
        f >> A >> B >> C >> D >> E;
        Solve();
    }
    return 0;
}