Cod sursa(job #1708909)

Utilizator UTCN_heapstrUTCN HeapStr UTCN_heapstr Data 28 mai 2016 10:12:54
Problema Carte2 Scor 0
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.68 kb
#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <string>
#include <string.h>
#include <math.h>
#include<iostream>
int t;
using namespace std;
int a, b, c, d, e;
int main(){
	freopen("carte2.in", "r", stdin);
		freopen("carte2.out", "w", stdout);

	scanf("%d", &t);
	for (int u = 1; u <= t; u++)
	{
		scanf("%d %d", &a, &b);
		scanf("%d %d %d", &c, &d, &e);
		if (a > b)
			swap(a, b);
		if (c > d)
			swap(c, d);
		if (d > e)
			swap(d, e);
		if (c > e)
			swap(c, e);
		if (b < e&&a < d)
			printf("posibil\n");
		else
			printf("imposibil\n");

	}


	return 0;
}