Pagini recente » Cod sursa (job #2570053) | Cod sursa (job #884675) | Cod sursa (job #2596021) | Cod sursa (job #3128808) | Cod sursa (job #1708967)
#include <iostream>
#include <fstream>
using namespace std;
int main(){
ifstream in("carte2.in");
ofstream out("carte2.out");
int t, a, b, c, d, e;
int max = 0,max2=0;
in >> t;
while (t--){
max = 0; max2 = 0;
in >> a >> b >> c>>d>>e;
max = c;
if (d > c){
max = d;
max2 = c;
}
else max2 = d;
if (e > max2){
if (e > max){
max2 = max;
max = e;
}
else{
max2 = e;
}
}
if (a > b){
if (a < max && b < max2){
out << "posibil\n";
}
else{
out << "imposibil\n";
}
}
else{
if (a < max2 && b < max){
out << "posibil\n";
}
else{
out << "imposibil\n";
}
}
}
}