Cod sursa(job #1708935)

Utilizator UNIBUC_Costan_Iordache_MagureanuGangster Teddy Bears Trio UNIBUC_Costan_Iordache_Magureanu Data 28 mai 2016 10:17:48
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.58 kb
#include <fstream>

using namespace std;

ifstream fin("carte2.in");
ofstream fout("carte2.out");

int main() {

    int testsCount;
    fin >> testsCount;

    while(testsCount--) {

        int a, b, c, d, e;
        fin >> a >> b >> c >> d >> e;

        if(a > b)
            swap(a, b);

        if(c > d)
            swap(c, d);
        if (c > e)
            swap(c, e);
        if(d > e)
            swap(d, e);

        if(b < e && a < d)
            fout << "posibil\n";
        else
            fout << "imposibil\n";

    }

    return 0;

}