Cod sursa(job #1708900)
Utilizator | UCV Turcu Abu-ras Albastroiu flawless | Data | 28 mai 2016 10:10:04 |
---|---|---|---|
Problema | Carte2 | Scor | 100 |
Compilator | cpp | Status | done |
Runda | ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest | Marime | 0.51 kb |
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
ifstream fin("carte2.in");
ofstream fout("carte2.out");
int n,i,v1[3],v2[5],j;
int main()
{
fin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=2;j++)
fin>>v1[j];
for(j=1;j<=3;j++)
fin>>v2[j];
sort(v2+1,v2+4);
sort(v1+1,v1+3);
if(v1[1] < v2[2] && v1[2] < v2[3])
fout<<"posibil\n";
else
fout<<"imposibil\n";
}
}