Cod sursa(job #3289725)
| Utilizator | Data | 28 martie 2025 12:08:40 | |
|---|---|---|---|
| Problema | Carte2 | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva ICPC | Marime | 0.54 kb |
#include <fstream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int t, i, a, b, c, d, e;
ifstream fin( "carte2.in" );
ofstream fout( "carte2.out" );
fin >> t;
for( i = 0; i < t; i++ ){
vector <int> x, y;
fin >> a >> b >> c >> d >> e;
x = { a, b };
y = { c, d, e };
sort( x.begin(), x.end(), greater <int>() );
sort( y.begin(), y.end(), greater <int>() );
if( x[0] < y[0] && x[1] < y[1] ){
fout << "posibil" << '\n';
}
else{
fout << "imposibil" << '\n';
}
}
return 0;
}