Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class FitInBox
- {
- static void Main()
- {
- int w1 = int.Parse(Console.ReadLine());
- int h1 = int.Parse(Console.ReadLine());
- int d1 = int.Parse(Console.ReadLine());
- int w2 = int.Parse(Console.ReadLine());
- int h2 = int.Parse(Console.ReadLine());
- int d2 = int.Parse(Console.ReadLine());
- if ((w2 < w1 && h2 < h1) || (d2 < d1 && w2 < w1) || (d2 < d1 && h2 < h1))
- {
- int w3 = w1;
- int h3 = h1;
- int d3 = d1;
- w1 = w2;
- w2 = w3;
- h1 = h2;
- h2 = h3;
- d1 = d2;
- d2 = d3;
- }
- if ((w1 < w2 && h1 < h2 && d1 < d2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, w2, h2, d2);
- if ((w1 < w2 && h1 < d2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, w2, d2, h2);
- if ((w1 < h2 && h1 < w2 && d1 < d2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, w2, d2);
- if ((w1 < h2 && h1 < d2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, d2, w2);
- if ((w1 < d2 && h1 < w2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, w2, h2);
- if ((w1 < d2 && h1 < h2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, h2, w2);
- }
- }
- }
- }
- }
- }
- else if ((w1 < w2 && h1 < d2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, w2, d2, h2);
- if ((w1 < h2 && h1 < w2 && d1 < d2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, w2, d2);
- if ((w1 < h2 && h1 < d2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, d2, w2);
- if ((w1 < d2 && h1 < w2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, w2, h2);
- if ((w1 < d2 && h1 < h2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, h2, w2);
- }
- }
- }
- }
- }
- else if ((w1 < h2 && h1 < w2 && d1 < d2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, w2, d2);
- if ((w1 < h2 && h1 < d2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, d2, w2);
- if ((w1 < d2 && h1 < w2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, w2, h2);
- if ((w1 < d2 && h1 < h2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, h2, w2);
- }
- }
- }
- }
- else if ((w1 < h2 && h1 < d2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, h2, d2, w2);
- if ((w1 < d2 && h1 < w2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, w2, h2);
- if ((w1 < d2 && h1 < h2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, h2, w2);
- }
- }
- }
- else if ((w1 < d2 && h1 < w2 && d1 < h2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, w2, h2);
- if ((w1 < d2 && h1 < h2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, h2, w2);
- }
- }
- else if ((w1 < d2 && h1 < h2 && d1 < w2))
- {
- Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", w1, h1, d1, d2, h2, w2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement