Cod sursa(job #1708971)

Utilizator alexandra_paticaAndreea Alexandra Patica alexandra_patica Data 28 mai 2016 10:25:01
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.59 kb
#include <fstream>
using namespace std;
ifstream f ("carte2.in");
ofstream g ("carte2.out");
int t, i, a, b, c, d, e;
int main ()
{
    f >> t;
    for (i=1; i<=t; i++){
        f >> a >> b >> c >> d >> e;
        if (a<c && b<d) g << "posibil" << '\n';
        else if (a<c && b<e) g << "posibil" << '\n';
        else if (a<d && b<c) g << "posibil" << '\n';
        else if (a<d && b<e) g << "posibil" << '\n';
        else if (a<e && b<c) g << "posibil" << '\n';
        else if (a<e && b<d) g << "posibil" << '\n';
        else g << "imposibil" << '\n';
    }
    return 0;
}