22343_AdventuresinMoving-PartV

2022-5-16 18:21| 发布者: Hocassian| 查看: 20| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506340139600-Problem List-采集的数据-后羿采集器.html

Pro.ID

22343

Title

Adventures in Moving - Part V

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22343

AC

0

Submit

5

Ratio

0.00%

时间&空间限制

  • Time Limit: 1200/400 MS (Java/Others)     Memory Limit: 131072/65536 K (Java/Others)
  • 描述

    To save money you are considering renting a small cube van to transport your belongings to the Big City. The interior of the van is a rectangular box with width w, height h, and length l. The box has a sliding door that lifts but only to height H. That is, there is an immovable overhang of height H-h at the top of the door.

    You have a large rectangular box that you wish to load on the truck. Can you get it on the truck subject to the following constraints:

    • The box must fit through the door, tilting it forward or sideways (but not both) as necessary (see figure below).
    • The box must be placed with one side flat against the floor.
    • The box must be placed with one side flat against the front wall.
    • The door must close once the box is in place.

    You may assume there are no obstructions (such as a ceiling or the ground) outside the truck that might interfere with loading.

     

     

    输入

    There are several test cases, each represented by two lines of input. The first line of each contains 4 integers: w, h, l, H. The next line contains 3 integers - the dimensions of the box.

    输出

    Description
    To save money you are considering renting a small cube van to transport your belongings to the Big City. The interior of the van is a rectangular box with width w, height h, and length l. The box has a sliding door that lifts but only to height H. That is, there is an immovable overhang of height H-h at the top of the door.

    You have a large rectangular box that you wish to load on the truck. Can you get it on the truck subject to the following constraints:

    • The box must fit through the door, tilting it forward or sideways (but not both) as necessary (see figure below).
    • The box must be placed with one side flat against the floor.
    • The box must be placed with one side flat against the front wall.
    • The door must close once the box is in place.

    You may assume there are no obstructions (such as a ceiling or the ground) outside the truck that might interfere with loading.

     

     

    Input
    There are several test cases, each represented by two lines of input. The first line of each contains 4 integers: w, h, l, H. The next line contains 3 integers - the dimensions of the box.
    Output
    For each test case, print "The box goes on the truck." if it is possible to load the box on the truck; otherwise print "The box will not go on the truck." You may assume that you start with an empty truck for each test case.
    Sample Input
    8 8 12 7
    8 12 8
    8 8 12 7
    7 12 8
    8 8 12 7
    1 7 13
    100 200 99 190
    100 195 30
    Sample Output
    The box will not go on the truck.
    The box goes on the truck.
    The box will not go on the truck.
    The box goes on the truck.
    Source

    样例输入

    8 8 12 7
    8 12 8
    8 8 12 7
    7 12 8
    8 8 12 7
    1 7 13
    100 200 99 190
    100 195 30

    样例输出

    The box will not go on the truck.
    The box goes on the truck.
    The box will not go on the truck.
    The box goes on the truck.

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部