Pagini recente » Cod sursa (job #1977150) | Cod sursa (job #2840230) | Cod sursa (job #1090664) | Cod sursa (job #2218619) | Cod sursa (job #1713692)
#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;
}