-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThe Box.txt
41 lines (29 loc) · 1.19 KB
/
The Box.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Wow! This problem is kind of tricky. If you're ready to put your thinking cap on, brace yourself and good luck! Otherwise, you can skip it by now and return any time later
There are two boxes on the table. The first box has a size of X1 x Y1 x Z1, and the second box has a size of X2 x Y2 x Z2. You need to determine which box can be put inside another box. You can rotate both boxes as you want.
The input contains two lines. The first line contains numbers X1, Y1, Z1, the second line contains numbers X2, Y2, Z2. All numbers are integers and they are greater than 0.
The output should be the following:
If the sizes of the boxes are equal, print "Box 1 = Box 2".
If the first box can be put inside the second box, print "Box 1 < Box 2".
If the second box can be put inside the first box, print "Box 1 > Box 2".
If none of the boxes can be put inside another one, print "Incomparable".
Pay attention to the examples below!
Sample Input:
1 1 1
2 2 2
Sample Output:
Box 1 < Box 2
Sample Input:
2 2 2
1 2 2
Sample Output:
Box 1 > Box 2
Sample Input:
1 2 3
2 3 1
Sample Output:
Box 1 = Box 2
Sample Input:
2 3 4
1 3 5
Sample Output:
Incomparable