Cod sursa(job #1802087)
Utilizator | Data | 9 noiembrie 2016 20:55:05 | |
---|---|---|---|
Problema | Carte2 | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva ICPC | Marime | 0.42 kb |
#include <fstream>
using namespace std;
ifstream f ("carte2.in");
ofstream g ("carte2.out");
int t,a,b,c,d,e,i,ok;
bool ba(int x,int y)
{
return(a<x&&b<y)||(a<y&&b<x);
}
int main()
{
f>>t;
for(i=1;i<=t;++i)
{
f>>a>>b>>c>>d>>e;
ok|=ba(c,d);
ok|=ba(d,e);
ok|=ba(c,e);
if(ok) g<<"posibil"<<"\n";
else g<<"imposibil"<<"\n";
}
return 0;
}