Pagini recente » Cod sursa (job #3224588) | Cod sursa (job #1237858) | Cod sursa (job #966977) | Cod sursa (job #58866) | Cod sursa (job #1709140)
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include <fstream>
#include <iostream>
using namespace std;
ifstream f("carte2.in");
ofstream g("carte2.out");
int pos(int A, int B, int C, int D, int E)
{
if (A < D && B < E) return 1;
if (A < E && B < D) return 1;
if (A < C && B < D) return 1;
if (A < D && B < C) return 1;
if (A < C && B < E) return 1;
if (A < E && B < C) return 1;
return 0;
}
int main()
{
int T, A, B, C, D, E, i;
f>> T;
for (i = 1;i <= T;i++)
{
f >> A >> B >> C >> D >> E;
if (pos(A, B, C, D, E) == 1) g << "posibil\n";
else g << "imposibil\n";
}
return 0;
}