Cod sursa(job #1713692)

Utilizator tudormaximTudor Maxim tudormaxim Data 6 iunie 2016 10:36:51
Problema Carte2 Scor 100
Compilator cpp Status done
Runda Arhiva ICPC Marime 0.6 kb
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

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

int t, book[3], box[4];
int main() {
    ios_base :: sync_with_stdio(false);
    fin >> t;
    while (t--) {
        fin >> book[1] >> book[2] >> box[1] >> box[2] >> box[3];
        sort(book + 1, book + 3);
        sort(box + 1, box + 4);
        if (book[1] < box[2] && book[2] < box[3]) {
            fout << "posibil\n";
        } else {
            fout << "imposibil\n";
        }
    }
    fin.close();
    fout.close();
    return 0;
}