Pagini recente » Cod sursa (job #2634686) | Cod sursa (job #1973042) | Cod sursa (job #954855) | Cod sursa (job #321579) | Cod sursa (job #1708961)
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
std::ifstream in("carte2.in");
std::ofstream out("carte2.out");
std::vector<int> V1, V2;
int main() {
int t;
in >> t;
while (t--) {
int x, y, a, b, c;
in >> x >> y >> a >> b >> c;
V1.push_back(x);
V1.push_back(y);
V2.push_back(a);
V2.push_back(b);
V2.push_back(c);
std::sort(V1.begin(), V1.end());
std::sort(V2.begin(), V2.end());
if (V1[0] < V2[1] && V1[1] < V2[2]) out << "posibil\n";
else out << "imposibil\n";
V1.clear();
V2.clear();
}
return 0;
}