E. Space guardians

Codeforces
IDCF10241E
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
An unknown solar system is guarded from the attacks of aliens by $n$ powerful starships. The starship number $i$ is located in the coordinates $(x_i, y_i, z_i)$ and is powerful enough to protect the region of space within the radious $r_i$. Sadly, the capitans of the starships have been arguing a lot and the senat decided to reorganize the defensive system according to the following rules: First line of input contains $1 <= n <= 100$: the number of starships. The n follwing lines describes the starships, in each line there are four numbers: $1 <= x_i, y_i, z_i, r_i <= 10^4$. In the first line print how many starships you have chosen. In the second line print the numbers of the chosen starships. They can be in any order. If the answer does not not exist print "NO". ## Input First line of input contains $1 <= n <= 100$: the number of starships. The n follwing lines describes the starships, in each line there are four numbers: $1 <= x_i, y_i, z_i, r_i <= 10^4$. ## Output In the first line print how many starships you have chosen. In the second line print the numbers of the chosen starships. They can be in any order. If the answer does not not exist print "NO". [samples]
**Definitions** Let $ t \in \mathbb{Z} $ be the number of test cases. For each test case $ k \in \{1, \dots, t\} $, let $ r_{k,1}, r_{k,2} \in \mathbb{Z} $ denote the radii of the two circles. **Constraints** 1. $ 1 \le t \le 10^5 $ 2. For each $ k \in \{1, \dots, t\} $: $ 1 \le r_{k,1}, r_{k,2} \le 10^6 $ **Objective** Assume the grey area is the region inside the larger circle and outside the smaller circle (annular region). For each test case $ k $, compute: $$ A_k = \pi \cdot \left( \max(r_{k,1}, r_{k,2})^2 - \min(r_{k,1}, r_{k,2})^2 \right) $$
API Response (JSON)
{
  "problem": {
    "name": "E. Space guardians",
    "description": {
      "content": "An unknown solar system is guarded from the attacks of aliens by $n$ powerful starships. The starship number $i$ is located in the coordinates $(x_i, y_i, z_i)$ and is powerful enough to protect the r",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10241E"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "An unknown solar system is guarded from the attacks of aliens by $n$ powerful starships. The starship number $i$ is located in the coordinates $(x_i, y_i, z_i)$ and is powerful enough to protect the r...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ t \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, t\\} $, let $ r_{k,1}, r_{k,2} \\in \\mathbb{Z} $ denote the radii of the two circles.\n\n**...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments