Cod sursa(job #1709227)

Utilizator DobosDumitriuTUIASI AC Team 2016 bis DobosDumitriu Data 28 mai 2016 11:22:35
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.4 kb
#include <fstream>
using namespace std;

ifstream in("carte2.in");
ofstream out("carte2.out");

bool check(int x, int y, int a, int b)
{
	return (x < a && y < b || y < a && x < b);
}

int main()
{
	int t, x, y, a, b, c;
	in >> t;
	while (t--)
	{
		in >> x >> y >> a >> b >> c;
		if (check(x,y,a,b) || check(x,y,b,c) || check(x,y,c,a))
			out << "posibil\n";
		else
			out << "imposibil\n";
	}
	return 0;
}