Pagini recente » Cod sursa (job #842080) | Cod sursa (job #194627) | Cod sursa (job #1160418) | Cod sursa (job #1298352) | Cod sursa (job #1708889)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("carte2.in");
ofstream fout("carte2.out");
inline void Solve(){
int a, b, c, d, e;
fin >> a >> b >> c >> d >> e;
if(a < c){
if(b < d || b < e){
fout << "posibil\n";
return;
}
}
if(a < d){
if(b < c || b < e){
fout << "posibil\n";
return;
}
}
if(a < e){
if(b < c || b < d){
fout << "posibil\n";
return;
}
}
if(b < c){
if(a < d || a < e){
fout << "posibil\n";
return;
}
}
if(b < d){
if(a < c || a < e){
fout << "posibil\n";
return;
}
}
if(b < e){
if(a < c || a < d){
fout << "posibil\n";
return;
}
}
fout << "imposibil\n";
return;
}
int main(){
int t;
fin >> t;
while(t--){
Solve();
}
return 0;
}