Cod sursa(job #1710367)
Utilizator | Data | 28 mai 2016 20:53:56 | |
---|---|---|---|
Problema | Carte2 | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva ICPC | Marime | 0.41 kb |
#include <fstream>
#include <algorithm>
using namespace std;
ifstream f("carte2.in");
ofstream g("carte2.out");
int v[4],a,b,t;
int main()
{
f>>t;
while (--t>=0)
{
f>>a>>b>>v[1]>>v[2]>>v[3];
sort(v+1,v+4);
if (a>b)
swap(a,b);
if (b<v[3] && a<v[2])
g<<"posibil\n";
else
g<<"imposibil\n";
}
return 0;
}