Pagini recente » Cod sursa (job #1464063) | Cod sursa (job #1887416) | Cod sursa (job #3175627) | Cod sursa (job #3253239) | Cod sursa (job #2299385)
#include<bits/stdc++.h>
using namespace std;
ifstream fin("carte2.in");
ofstream fout("carte2.out");
void verdict(int* v)
{
if(v[0]>v[1])
swap(v[0],v[1]);
if(v[2]>v[3])
swap(v[2],v[3]);
if(v[2]>v[4])
swap(v[2],v[4]);
if(v[3]>v[4])
swap(v[3],v[4]);
/*
cout<<'\n';
for(int i=0;i<5;i++)
cout<<v[i]<<" ";
cout<<'\n';*/
if(v[4]<=v[1] || v[3]<=v[0])
fout<<"im";
fout<<"posibil"<<'\n';
return;
}
int main()
{
int n,i,j,v[5];
fin>>n;
for(i=0;i<n;i++)
{
for(j=0;j<5;j++)
{
fin>>v[j];
}
verdict(v);
}
return 0;
}