21869_Submarines

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

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

Pro.ID

21869

Title

Submarines

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

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

    The Russian navy has, as you probably know, had some problems with their submarines in Swedish waters. These problems are very embarrassing for the Russian military, who has decided to do something about it.

    As a first step in their plan, they want to construct a program for their centre of command to be able to locate their submarines.

    From GPSes (Global Positioning Systems) they are able to get X and Y coordinates for the front and rear points of all submarines. The Russian intelligence has in addition provided data for all islands in the Swedish waters. With this information, and with a lot of help from simulations using GPS equipped minks, Russian programmers have been able to develop a program that, from the information given, tells the user if a submarine is

    1. Still in water

    2. Partially on land

    3. Entirely on land

    输入

    First you will get the number of submarines that are present in the area. [1..100]

    After that, for each submarine, you will get the X and Y positions first for the submarines front and then for its rear. [-1000..1000] Then you will get the number of islands in the area. [1..50]

    After that, for each island you will get the following: The number of points of the polygon that represents the island. [3..20], The X and Y positions of the points. [-1000..1000]

    All input are integers. No submarine end point will be on an island edge. No submarine will lie on an island edge. All islands are simple polygons without crossing edges or touching borders. The first point of the island is connected to the last point. All submarines are approximated with a line between the front and rear points. Two islands never overlap or touch each other.

    输出

    Description

    The Russian navy has, as you probably know, had some problems with their submarines in Swedish waters. These problems are very embarrassing for the Russian military, who has decided to do something about it.

    As a first step in their plan, they want to construct a program for their centre of command to be able to locate their submarines.

    From GPSes (Global Positioning Systems) they are able to get X and Y coordinates for the front and rear points of all submarines. The Russian intelligence has in addition provided data for all islands in the Swedish waters. With this information, and with a lot of help from simulations using GPS equipped minks, Russian programmers have been able to develop a program that, from the information given, tells the user if a submarine is

    1. Still in water

    2. Partially on land

    3. Entirely on land

    Input

    First you will get the number of submarines that are present in the area. [1..100]

    After that, for each submarine, you will get the X and Y positions first for the submarines front and then for its rear. [-1000..1000] Then you will get the number of islands in the area. [1..50]

    After that, for each island you will get the following: The number of points of the polygon that represents the island. [3..20], The X and Y positions of the points. [-1000..1000]

    All input are integers. No submarine end point will be on an island edge. No submarine will lie on an island edge. All islands are simple polygons without crossing edges or touching borders. The first point of the island is connected to the last point. All submarines are approximated with a line between the front and rear points. Two islands never overlap or touch each other.

    Output

    Output contains information about every submarine, in order.

    If the submarine is all in water, print "Submarine X is still in water."

    If the submarine is all on land, print "Submarine X is completely on land."

    If the submarine is partially in water and partially on land, print "Submarine X is partially on land."

    X is the submarine's number (1, 2, 3, ...) according to it's order in the input file.

    Sample Input

    5
    11 11 9 9
    0 0 4 0
    0 1 10 1
    0 6 6 0
    0 -10 0 -9
    2
    4
    -5 -5
    5 -5
    5 5
    -5 5
    3
    -2 -8
    -1 -9
    -2 -10

    Sample Output

    Submarine 1 is still in water.
    Submarine 2 is completely on land.
    Submarine 3 is partially on land.
    Submarine 4 is partially on land.
    Submarine 5 is still in water.

    Source

    样例输入

    5
    11 11 9 9
    0 0 4 0
    0 1 10 1
    0 6 6 0
    0 -10 0 -9
    2
    4
    -5 -5
    5 -5
    5 5
    -5 5
    3
    -2 -8
    -1 -9
    -2 -10

    样例输出

    Submarine 1 is still in water.
    Submarine 2 is completely on land.
    Submarine 3 is partially on land.
    Submarine 4 is partially on land.
    Submarine 5 is still in water.

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部