Advertisement
zh_stoqnov

Fit_Box_in_Box

Oct 30th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Fit_Box_in_Box
  4. {
  5. class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9. int w1 = int.Parse(Console.ReadLine());
  10. int h1 = int.Parse(Console.ReadLine());
  11. int d1 = int.Parse(Console.ReadLine());
  12. int w2 = int.Parse(Console.ReadLine());
  13. int h2 = int.Parse(Console.ReadLine());
  14. int d2 = int.Parse(Console.ReadLine());
  15. int a = 0;
  16. int s = 0;
  17. int d = 0;
  18. int q = 0;
  19. int w = 0;
  20. int e = 0;
  21. if (w1 < w2 && h1 < h2 && d1 < d2)
  22. {
  23. a = w1;
  24. s = h1;
  25. d = d1;
  26. q = w2;
  27. w = h2;
  28. e = d2;
  29. }
  30. else
  31. {
  32. a = w2;
  33. s = h2;
  34. d = d2;
  35. q = w1;
  36. w = h1;
  37. e = d1;
  38. }
  39. if(a < q && s < w && d < e)
  40. {
  41. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})", a, s, d, q, w, e);
  42. }
  43. if(a < q && s < e && d < w)
  44. {
  45. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",a,s,d,q,e,w);
  46. }
  47. if(a < w && s < e && d < q)
  48. {
  49. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",a,s,d,w,e,q);
  50. }
  51. if(a < w && s < q && d < e)
  52. {
  53. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",a,s,d,w,q,e);
  54. }
  55. if(a < e && s < q && d < w)
  56. {
  57. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",a,s,d,e,q,w);
  58. }
  59. if(a < e && s < w && d < q)
  60. {
  61. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",a,s,d,e,w,q);
  62. }
  63. if(q < a && w < s && e < d)
  64. {
  65. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",q,w,e,a,s,d);
  66. }
  67. if(q < a && w < d && e < s)
  68. {
  69. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",q,w,e,a,d,s);
  70. }
  71. if(q < s && w < d && e < a)
  72. {
  73. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",q,w,e,s,d,a);
  74. }
  75. if(q < s && w < a && e < d)
  76. {
  77. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",q,w,e,s,a,d);
  78. }
  79. if(q < d && w < s && e < a)
  80. {
  81. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",q,w,e,d,s,a);
  82. }
  83. if(q < d && w < a && e < s)
  84. {
  85. Console.WriteLine("({0}, {1}, {2}) < ({3}, {4}, {5})",q,w,e,d,a,s);
  86. }
  87.  
  88. }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement