Pagini recente » Cod sursa (job #430416) | Cod sursa (job #2061925) | Cod sursa (job #497089) | Cod sursa (job #1928238) | Cod sursa (job #1709134)
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <fstream>
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;
}