Cod sursa(job #1710157)

Utilizator bciobanuBogdan Ciobanu bciobanu Data 28 mai 2016 16:35:07
Problema Carte2 Scor 100
Compilator cpp Status done
Runda Arhiva ICPC Marime 0.54 kb
#include <bits/stdc++.h>

using namespace std;

int main() {
  ifstream fin("carte2.in");
  ofstream fout("carte2.out");
  fin.tie(0);
  ios_base::sync_with_stdio(0);

  int numTests; fin >> numTests;

  while (numTests--) {
    int a, b, c, d, e; fin >> a >> b >> c >> d >> e;
    if ((a < c && b < d) || (a < d && b < e) || (a < c && b < e)
      || (b < c && a < d) || (b < d && a < e) || (b < c && a < e))
        fout << "posibil\n";
    else
      fout << "imposibil\n";
  }
  fin.close();
  fout.close();
  return 0;
}