Cod sursa(job #1708902)

Utilizator TeamFIIHUAIC FIICoders TeamFIIH Data 28 mai 2016 10:10:18
Problema Carte2 Scor 0
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.78 kb
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <string>
#include <algorithm>
#include <cmath>
#include <functional>
#include <utility>
#include <cstdio>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int t,a,b;
    int d[3];
    cin>>t;
    while(t--){
        cin>>a>>b>>d[0]>>d[1]>>d[2];
        sort(d, d+3);
        if(a < b){
            int temp = a;
            a = b;
            b = temp;
        }
        else{
            int temp = b;
            b = a;
            a = temp;
        }
        if(a < d[2] && b < d[1]){
            cout<<"posibil\n";
        }
        else{
            cout<<"imposibil\n";
        }
    }

    return 0;
}