21294_Wax

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

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

Pro.ID

21294

Title

Wax

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

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

    You are a flooring contractor with bickering employees. You need to have these employees work together to wax the floor of some rooms, each with 1 door.

    None of the workers want to work more than the others, and insist on working together so they can see if someone else is goofing off, so you must assign equal areas of each room to each employee. Each worker is assigned a contiguous portion of the room to wax. The portions assigned are separated by straight line segments that radiate out from the doorway to a wall in the room, so they can exit the room after the job is done.

    输入

    The input is a series of problem definitions as follows:

    WIDTH HEIGHT DOOR WORKERS

    Each is a non-negative integer value less than or equal to 100, with at least 2 workers, and a positive WIDTH and HEIGHT. They specify the positions of the corners of the room: (0,0), (WIDTH,0), (WIDTH,HEIGHT), and(0,HEIGHT), as well as the location of the door: (DOOR,0), 0 < DOOR < WIDTH. Each problem definition is given on its own line.

    The end of input is indicated by a list of 4 zeros:

    0 0 0 0

    输出

    Description

    You are a flooring contractor with bickering employees. You need to have these employees work together to wax the floor of some rooms, each with 1 door.

    None of the workers want to work more than the others, and insist on working together so they can see if someone else is goofing off, so you must assign equal areas of each room to each employee. Each worker is assigned a contiguous portion of the room to wax. The portions assigned are separated by straight line segments that radiate out from the doorway to a wall in the room, so they can exit the room after the job is done.

    Input

    The input is a series of problem definitions as follows:

    WIDTH HEIGHT DOOR WORKERS

    Each is a non-negative integer value less than or equal to 100, with at least 2 workers, and a positive WIDTH and HEIGHT. They specify the positions of the corners of the room: (0,0), (WIDTH,0), (WIDTH,HEIGHT), and(0,HEIGHT), as well as the location of the door: (DOOR,0), 0 < DOOR < WIDTH. Each problem definition is given on its own line.

    The end of input is indicated by a list of 4 zeros:

    0 0 0 0
    Output
    The output are the coordinates, with 3 decimal digits of precision, of the ends of the WORKERS-1 line segments extending from the door to a wall of the room so that the room is divided into WORKERS parts with equal areas. The points should be given in counter-clockwise order.
    Sample Input
    3 5 2 4
    10 10 5 2
    10 10 5 4
    0 0 0 0
    Sample Output
    2.500 5.000 1.000 5.000 0.000 3.750
    5.000 10.000
    10.000 10.000 5.000 10.000 0.000 10.000
    Source

    样例输入

    3 5 2 4
    10 10 5 2
    10 10 5 4
    0 0 0 0

    样例输出

    2.500 5.000 1.000 5.000 0.000 3.750
    5.000 10.000
    10.000 10.000 5.000 10.000 0.000 10.000

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部