22504_SupercomputerSelection,TheSeque

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

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

Pro.ID

22504

Title

Supercomputer Selection, The Sequel

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

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

    Valentine sighed as she sat down to lunch with her cousin, Martin Thiel, in the BIT student union Diner.

    "What's the matter, Valentine?" Martin asked.

    "My presentation to the SSC. They all really liked the graphical displays of the criteria and the selection process," Valentine grudgingly admitted. "But, Prof. Everett pointed out that the criteria would change over time and since we will be using the machine over several years, that we needed to take that into account as well."

    "Maybe you could make separate graphs for each year?" suggested Martin.

    "That's what I said to Prof. Everett, but she didn't think that would be sufficient --- it would only pick the best machine for a particular year."

    As Valentine silently pondered her problem, Jake Briggs, one of Valentine's CS classmates, joined Martin and Valentine at their table. "What's up?" he asked. Valentine explained her dilemma.

    "Simple," Jake mumbled through bites of his club sandwich. "Make three-dimensional shapes, using time as the third axis. The computer with the largest volume wins."

    Valentine sketched out a perspective drawing of such a volume as well as a detail of a single quadrant. "What do we do here at the edges of the axes? There are four points." Valentine pointed to the points a, b, c, and d in her drawing of the quadrant.

    "Just use two planes, one determined by a, b, and c, and the other determined by b, and c, and d."

    "Whoa! Problem!" exclaimed Martin. "Those volume things are way too complicated for slideware. You'll just confuse everyone."

    "No problem," Jake said. "We can use our virtual reality cave over in the JFK building. It even has tactile feedback gloves. The committee members can touch the volumes if they want."

    输入

    The first line of input will contain two integers. The first integer, n, specifies the number of criteria that will be measured for each year. This value will be such that 1 <= n <= 100. The second integer, y specifies how many years will be considered. The value of y will be such that 1 <= y <= 10.

    The rest of the input will consist of sequences of possible configurations of supercomputers; each line will contain n floating point values. The supercomputer configurations will be grouped in sets of y, i.e., the first y lines (after the initial line of two integers) will be the yearly configurations for the first computer. The next y lines will be the yearly configurations for the second computer, etc.

    The first number on the input line corresponds to the value on the first axis, the second number corresponds to the value on the second axis, and so on.

    The final line of input will contain n floating point zeros.

    输出

    Description
    Valentine sighed as she sat down to lunch with her cousin, Martin Thiel, in the BIT student union Diner.

    "What's the matter, Valentine?" Martin asked.

    "My presentation to the SSC. They all really liked the graphical displays of the criteria and the selection process," Valentine grudgingly admitted. "But, Prof. Everett pointed out that the criteria would change over time and since we will be using the machine over several years, that we needed to take that into account as well."

    "Maybe you could make separate graphs for each year?" suggested Martin.

    "That's what I said to Prof. Everett, but she didn't think that would be sufficient --- it would only pick the best machine for a particular year."

    As Valentine silently pondered her problem, Jake Briggs, one of Valentine's CS classmates, joined Martin and Valentine at their table. "What's up?" he asked. Valentine explained her dilemma.

    "Simple," Jake mumbled through bites of his club sandwich. "Make three-dimensional shapes, using time as the third axis. The computer with the largest volume wins."

    Valentine sketched out a perspective drawing of such a volume as well as a detail of a single quadrant. "What do we do here at the edges of the axes? There are four points." Valentine pointed to the points a, b, c, and d in her drawing of the quadrant.

    "Just use two planes, one determined by a, b, and c, and the other determined by b, and c, and d."

    "Whoa! Problem!" exclaimed Martin. "Those volume things are way too complicated for slideware. You'll just confuse everyone."

    "No problem," Jake said. "We can use our virtual reality cave over in the JFK building. It even has tactile feedback gloves. The committee members can touch the volumes if they want."

    Input
    The first line of input will contain two integers. The first integer, n, specifies the number of criteria that will be measured for each year. This value will be such that 1 <= n <= 100. The second integer, y specifies how many years will be considered. The value of y will be such that 1 <= y <= 10.

    The rest of the input will consist of sequences of possible configurations of supercomputers; each line will contain n floating point values. The supercomputer configurations will be grouped in sets of y, i.e., the first y lines (after the initial line of two integers) will be the yearly configurations for the first computer. The next y lines will be the yearly configurations for the second computer, etc.

    The first number on the input line corresponds to the value on the first axis, the second number corresponds to the value on the second axis, and so on.

    The final line of input will contain n floating point zeros.

    Output
    The output should be the configuration number (indexed from 1) which gives the configuration with the greatest volume, along with the value of the volume. The volume is to be given to two decimal places. Assume that the polygons are spaced with unit time along the time axis.

    In case of a tie (i.e., multiple configurations are given that produce a polygon of equal volume), output the one with the lowest configuration number.

    Sample Input
    5 2
    1.2 2.3 3.4 4.5 5.6
    0.2 3.3 4.4 5.6 4.5
    10.0 11.0 12.0 13.0 14.0
    9.0 12.0 11.0 14.0 13.0
    0.0 0.0 0.0 0.0 0.0
    Sample Output
    2 339.84
    Source

    样例输入

    5 2
    1.2 2.3 3.4 4.5 5.6
    0.2 3.3 4.4 5.6 4.5
    10.0 11.0 12.0 13.0 14.0
    9.0 12.0 11.0 14.0 13.0
    0.0 0.0 0.0 0.0 0.0

    样例输出

    2 339.84

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部