|
Boxes
|
|
10-05-2009, 07:53 PM
(This post was last modified: 10-06-2009 12:05 AM by XIO-X2.)
Post: #1
|
|||
|
|||
|
Boxes
You know the height, the width and the length of two boxes. You have to check if one box can be put inside the other one. In other words, can you rotate one of the boxes so that it can be put into the other one.
INPUT: You should read the input from the standard input. From the first line read three integers d1, s1 i v1 - height, width and length of the first box. From the second line read another three integers d2, s2 i v2, height, width and length of the second box. All dimensions are less than 1000. OUTPUT: To the standard output write "DA" (without quotes), if one box can be put into the other one. Otherwise output "NE". Code: 1.Read rules ![]()
|
|||
|
10-05-2009, 10:00 PM
Post: #2
|
|||
|
|||
|
RE: Boxes
I can say this is really interesting !
I would make mistake in this, i would only check if a1>a2 and b1>b2 and c1>c2, but this about sorting, it is really good idea. Great solution. For those who doesn't know a lot about sorting, you have it here : http://www.pro9ramming.com/algorithm-for...g-t-4.html There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
10-06-2009, 02:38 AM
Post: #3
|
|||
|
|||
|
RE: Boxes
Thanks, this is my work from practice for last competition
Read rules ![]()
|
|||
|
« Next Oldest | Next Newest »
|







