Pagini recente » Cod sursa (job #2699694) | Cod sursa (job #2113917) | Cod sursa (job #2433322) | Cod sursa (job #619227) | Cod sursa (job #1708904)
#include <fstream>
using namespace std;
ifstream fin("carte2.in");
ofstream fout("carte2.out");
int main()
{
int t;
int a, b, c, d, e;
fin >> t;
bool ok;
for (int tt = 0; tt < t; tt++) {
fin >> a >> b >> c >> d >> e;
ok = false;
if (a < c && (b < d || b < e)) {
ok = true;
}
if (a < d && (b < c || b < e)) {
ok = true;
}
if (a < e && (b < c || b < d)) {
ok = true;
}
if (ok) {
fout << "posibil\n";
}
else {
fout << "imposibil\n";
}
}
}