Cod sursa(job #1709061)

Utilizator UBB2NibblesFromHellAlexandru Duma UBB2NibblesFromHell Data 28 mai 2016 10:45:13
Problema Carte2 Scor 100
Compilator cpp Status done
Runda ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest Marime 0.63 kb
#include <fstream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
	int t;
	vector<int> vbook;
	vector<int> vbox;
	vbook.push_back(0);
	vbook.push_back(0);
	vbox.push_back(0);
	vbox.push_back(0);
	vbox.push_back(0);
	ifstream f("carte2.in");
	ofstream g("carte2.out");
	f >> t;
	for (int i = 0; i < t; i++) {
		f >> vbook[0] >> vbook[1];
		f >> vbox[0] >> vbox[1] >> vbox[2];
		sort(vbook.begin(), vbook.end());
		sort(vbox.begin(), vbox.end());
		if (vbox[2] > vbook[1] && vbox[1] > vbook[0])
			g << "posibil" << endl;
		else g << "imposibil" << endl;
	}
	f.close();
	g.close();

	return 0;

}