A. Approach

Codeforces
IDCF10270A
Time1000ms
Memory512MB
Difficulty
English · Original
Formal · Original
Let's consider The National University of Colombia (UNAL) as a large coordinate plane centered at the most emblematic place of the University, the Che Square. Two friends are attending classes and now they may need to move in order to attend their next classes. The first of them is currently at a building located at $A$ and needs to go to the building located at $B$, the second friend is currently at a building located at $C$ and needs to go to the building located at $D$. They start to move at the same time, both of them move in a straight line and with the same constant speed. If one of them reaches his destination first, he will remain there, while the other one is still moving. Your task is to find the minimum distance between the two friends during their change of classes. You are given two lines each of them containing 4 integers separated by spaces. The first line contains $A. x$, $A. y$, $B. x$ and $B. y$. The second line contains $C. x$, $C. y$, $D. x$ and $D. y$. The absolute value of each coordinate doesn't exceed $10^9$. Output one line containing the answer to the task. Your answer will be considered correct if the absolute or relative error is at most $10^(-6)$. ## Input You are given two lines each of them containing 4 integers separated by spaces. The first line contains $A. x$, $A. y$, $B. x$ and $B. y$. The second line contains $C. x$, $C. y$, $D. x$ and $D. y$. The absolute value of each coordinate doesn't exceed $10^9$. ## Output Output one line containing the answer to the task. Your answer will be considered correct if the absolute or relative error is at most $10^(-6)$. [samples]
**Definitions** Let $ S \in \mathbb{S} $ be the input string representing the elephant's speech. Let $ N \in \mathbb{Z} $ be the number of ASCII art lines, with $ 1 \leq N \leq 50 $. Let $ A = (a_1, a_2, \dots, a_N) $ be a sequence of strings, where each $ a_i \in \mathbb{S} $ is a line of ASCII art. **Constraints** 1. $ 1 \leq N \leq 50 $ 2. Each string in $ A $ is non-empty and represents a line of ASCII art. **Objective** Output $ S $ followed by a newline, then output each $ a_i $ for $ i = 1 $ to $ N $ in order.
API Response (JSON)
{
  "problem": {
    "name": "A. Approach",
    "description": {
      "content": "Let's consider The National University of Colombia (UNAL) as a large coordinate plane centered at the most emblematic place of the University, the Che Square. Two friends are attending classes and no",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10270A"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Let's consider The National University of Colombia (UNAL) as a large coordinate plane centered at the most emblematic place of the University, the Che Square.\n\nTwo friends are attending classes and no...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ S \\in \\mathbb{S} $ be the input string representing the elephant's speech.  \nLet $ N \\in \\mathbb{Z} $ be the number of ASCII art lines, with $ 1 \\leq N \\leq 50 $.  \nLet $ A = (...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments