Cod sursa(job #3031734)
Utilizator | Tudor Calu tudorcalu | Data | 20 martie 2023 18:17:42 |
---|---|---|---|
Problema | Carte2 | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva ICPC | Marime | 0.66 kb |
#include <bits/stdc++.h>
#include <fstream>
using namespace std;
ifstream f("carte2.in");
ofstream g("carte2.out");
int main()
{
int t;
f >> t;
while (t)
{
int a, b, c, d, e;
f >> a >> b >> c >> d >> e;
bool ok = 0;
if (a < c && b < d)
ok = 1;
if (a < d && b < c)
ok = 1;
if (a < d && b < e)
ok = 1;
if (a < e && b < d)
ok = 1;
if (a < c && b < e)
ok = 1;
if (a < e && b < c)
ok = 1;
if (ok == 1)
g <<"posibil";
else g <<"imposibil";
t--;
}
return 0;
}