SSemen

Untitled

Oct 18th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int a, b, c, d, e, f;
  8.     cin >> d >> e >> f >> a >> b >> c;
  9.     cout << ((d >= a && e >= b && f >= c) || (d >= a && e >= c && f >= b)
  10.         || (d >= b && e >= a && f >= c) || (d >= b && e >= c && f >= a)
  11.         || (d >= c && e >= a && f >= b) || (d >= c && e >= b && f >= a) ?
  12.  
  13.         (d == a && e == b && f == c) || (d == a && e == c && f == b)
  14.         || (d == b && e == a && f == c) || (d == b && e == c && f == a)
  15.         || (d == c && e == a && f == b) || (d == c && e == b && f == a) ?
  16.         "Boxes are equal" : "The first box is larger than the second one"
  17.  
  18.         : (d < a && e < b && f < c) || (d < a && e < c && f < b)
  19.         || (d < b && e < a && f < c) || (d < b && e < c && f < a)
  20.         || (d < c && e < a && f < b) || (d < c && e < b && f < a) ?
  21.         "The first box is smaller than the second one" : "Boxes are incomparable");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment