Cod sursa(job #2675295)

Utilizator ililogIlinca ililog Data 21 noiembrie 2020 12:47:03
Problema Carte2 Scor 100
Compilator cpp-64 Status done
Runda Arhiva ICPC Marime 0.92 kb
using namespace std;
#include<bits/stdc++.h>

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

int t, a, b, c, d, e;

void rezolvare (int a, int b, int c, int d, int e) {
    
    if (a<c && b<d) {
        fout << "posibil \n";
        return;
    }
    
    if (a<d && b<c) {
        fout << "posibil \n";
        return;
    }
    
    if (a<d && b<e) {
        fout << "posibil \n";
        return;
    }
    
    if (a<e && b<d) {
        fout << "posibil \n";
        return;
    }
    
    if (a<c && b<e) {
        fout << "posibil \n";
        return;
    }
    
    if (a<e && b<c) {
        fout << "posibil \n";
        return;
    }
    
    fout << "imposibil \n";
}

int main() {
    
    fin >> t;
    for (int i = 1; i<=t; i++) {
        fin >> a >> b >> c >> d >> e;
        rezolvare(a,b,c,d,e);
    }
    
    fin.close();
    fout.close();

    return 0;
}