Cod sursa(job #1713192)
Utilizator | Data | 4 iunie 2016 22:01:31 | |
---|---|---|---|
Problema | Carte2 | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva ICPC | Marime | 0.64 kb |
#include <bits/stdc++.h>
using namespace std;
int t, a, b, c, d, e;
void read()
{
freopen("carte2.in", "r", stdin);
scanf("%d", &t);
}
void write()
{
freopen("carte2.out", "w", stdout);
while (t --)
{
scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
if (a > b)
swap(a, b);
if (c > d)
swap(c, d);
if (c > e)
swap(c, e);
if (d > e)
swap(d, e);
if (a < d && b < e)
printf("posibil\n");
else
printf("imposibil\n");
}
}
int main()
{
read();
write();
return 0;
}