Pagini recente » Cod sursa (job #2338745) | Cod sursa (job #2577948) | Statistici UAIC-Pojoga-Onesim-Berendea (UAIC_Pojoga_Onesim_Berendea) | Cod sursa (job #126950) | Cod sursa (job #1758019)
#include <fstream>
#include <algorithm>
#include <vector>
using namespace std;
ifstream f("carte2.in");
ofstream g("carte2.out");
int main() {
int t;
vector<int> book(2,0);
vector<int> box(3,0);
f >> t;
for (int i = 0; i < t; i++) {
f >> book[0] >> book[1];
f >> box[0] >> box[1] >> box[2];
sort(book.begin(), book.end());
sort(box.begin(), box.end());
if (box[2] > book[1] && box[1] > book[0])
g << "posibil" << endl;
else g << "imposibil" << endl;
}
f.close();
g.close();
return 0;
}