Mai intai trebuie sa te autentifici.
Cod sursa(job #1708891)
Utilizator | Data | 28 mai 2016 10:07:36 | |
---|---|---|---|
Problema | Carte2 | Scor | 0 |
Compilator | cpp | Status | done |
Runda | ONIS 2016 - Runda - 2 - ACM ICPC Romanian Programming Contest | Marime | 0.53 kb |
#include <bits/stdc++.h>
using namespace std;
vector <int> v;
int a, b, c, d, e, t;
int main() {
ifstream f("carte2.in");
ofstream g("carte2.out");
f>>t;
while(t--) {
f>>a>>b>>c>>d>>e;
v.clear();
v.push_back(a);
v.push_back(b);
v.push_back(1);
bool ok = false;
do {
if(v[0] < c && v[1] < d && v[2] < e)
ok = true;
} while(next_permutation(v.begin(), v.end()));
g<<(ok? "posibil\n":"imposibil\n");
}
return 0;
}