22676_GhostBusters

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

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

Pro.ID

22676

Title

Ghost Busters

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

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

    The famous Ghost Busters team has decided to upgrade their Ectomobile (aka Ecto-1) with a powerful proton gun and an advanced targeting system. Egon has designed and built all the hardware which consists of ectoplasmic scanner and a proton gun that has two degrees of freedom and can automatically rotate and fire in a 90 degrees trihedral angle. You have been hired to write a prototype for the targeting software.

    Ghosts are detected by ectoplasmic scanner and are represented as floating spheres. The coordinates of their centers and radii are delivered from the ectoplasmic scanner to the targeting software. The coordinate system is aligned is such a way, that the proton gun fires from the point (0, 0, 0) anywhere into X ≥ 0, Y ≥ 0, Z ≥ 0 trihedral angle. The gun fires a proton ray in a straight line and is so powerful, that even a touch of its ray is enough to kill a ghost. The ray of the proton gun is able to kill a virtually unlimited number of ghosts on its way.

    For the first prototype for the targeting software, you are asked to write a program that determines the maximal number of ghosts that can be killed with a single shot of the proton gun.

    输入

    On the first line of the input there is a single integer number N ( 0 ≤ N ≤ 100 ) --- the number of ghosts detected by the ectoplasmic scanner of Ecto-1. The following N lines describe detected ghosts - one ghost per line. The description of ith ghost (ghosts are numbered from 1 to N) consists of 4 integer numbers Xi, Yi, Zi, and Ri, separated by spaces. Xi, Yi, Zi ( 1 ≤ Xi, Yi, Zi ≤ 10000 ) are the coordinates of the ghost's center, and Ri ( 1 ≤ Ri ≤ min(Xi, Yi, Zi) ) is the ghost's radius. Because ghosts are ectoplasmic, they can be arbitrarily placed in respect to each others. They can intersect, fit inside each other, coincide with each other, etc.

    输出

    Description

    The famous Ghost Busters team has decided to upgrade their Ectomobile (aka Ecto-1) with a powerful proton gun and an advanced targeting system. Egon has designed and built all the hardware which consists of ectoplasmic scanner and a proton gun that has two degrees of freedom and can automatically rotate and fire in a 90 degrees trihedral angle. You have been hired to write a prototype for the targeting software.

    Ghosts are detected by ectoplasmic scanner and are represented as floating spheres. The coordinates of their centers and radii are delivered from the ectoplasmic scanner to the targeting software. The coordinate system is aligned is such a way, that the proton gun fires from the point (0, 0, 0) anywhere into X ≥ 0, Y ≥ 0, Z ≥ 0 trihedral angle. The gun fires a proton ray in a straight line and is so powerful, that even a touch of its ray is enough to kill a ghost. The ray of the proton gun is able to kill a virtually unlimited number of ghosts on its way.

    For the first prototype for the targeting software, you are asked to write a program that determines the maximal number of ghosts that can be killed with a single shot of the proton gun.

    Input

    On the first line of the input there is a single integer number N ( 0 ≤ N ≤ 100 ) --- the number of ghosts detected by the ectoplasmic scanner of Ecto-1. The following N lines describe detected ghosts - one ghost per line. The description of ith ghost (ghosts are numbered from 1 to N) consists of 4 integer numbers Xi, Yi, Zi, and Ri, separated by spaces. Xi, Yi, Zi ( 1 ≤ Xi, Yi, Zi ≤ 10000 ) are the coordinates of the ghost's center, and Ri ( 1 ≤ Ri ≤ min(Xi, Yi, Zi) ) is the ghost's radius. Because ghosts are ectoplasmic, they can be arbitrarily placed in respect to each others. They can intersect, fit inside each other, coincide with each other, etc.

    Output

    On the first line of the output write a single integer number --- the maximal number of ghosts that can be killed with a single shot of the proton gun. On the second line of the output file write the identifying numbers of the ghosts to be killed in an arbitrary order separated by spaces. If there are multiple ways to kill this number of ghosts then write any one.

    Sample Input

    13
    1200 1200 3900 300
    160 160 820 60
    100 10 10 10
    10 100 10 10
    10 10 100 10
    10 10 10 10
    50 50 50 10
    100 100 75 20
    100 75 100 20
    75 100 100 20
    3000 4000 7000 2600
    100 1000 1000 50
    1000 100 1000 100

    Sample Output

    5
    6 7 9 10 11

    Source

    样例输入

    13
    1200 1200 3900 300
    160 160 820 60
    100 10 10 10
    10 100 10 10
    10 10 100 10
    10 10 10 10
    50 50 50 10
    100 100 75 20
    100 75 100 20
    75 100 100 20
    3000 4000 7000 2600
    100 1000 1000 50
    1000 100 1000 100

    样例输出

    5
    6 7 9 10 11

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部