Cod sursa(job #1708934)

Utilizator UBB_Muresan_Nasca_StefanUBB Muresan Nasca Stefan UBB_Muresan_Nasca_Stefan Data 28 mai 2016 10:17:05
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.8 kb
#include <fstream>
#include <cmath>
using namespace std;

int n,m,i,j,t,a,b,c,d,e;

int main()
{

    ifstream fin("carte2.in");
    ofstream fout("carte2.out");
    fin>>t;
    for(i=1;i<=t;i++)
    {
       fin>>a>>b>>c>>d>>e;
       bool ok = false;
       if(a<c && b<d)
       {
           ok = true;
       }
       if(a<d && b<c)
       {
           ok = true;
       }
       if(a<d && b<e)
       {
           ok = true;
       }
       if(a<e && b<d)
       {
           ok = true;
       }
       if(a<c && b<e)
       {
           ok = true;
       }
       if(a<e && b<c)
       {
           ok = true;
       }

       if(ok==true)
       {
           fout<<"posibil\n";
       }
       else
       {
           fout<<"imposibil\n";
       }
    }


}