A. Shitália

Codeforces
IDCF10073A
Time2000ms
Memory64MB
Difficulty
English · Original
Formal · Original
After suddenly becoming a billionaire, Shi adopted YOLO as his motto and decided to buy a small european island, which he named Shitalia. Many people decided to move to Shitalia to run away from the economic crisis, and then created the Shitalian mafia, led by Dom Shi. The Shitalian economy is based on smuggling spoiled cheese, but, as you can imagine, there aren't many people interested in spoiled cheese. Therefore, Shi decided to earn money with land rental. Shitalia is a star-shaped island. Shi is very picky, so he chose a Shi-regular n-star. An n-star is Shi-regular if there are n outer points and n inner points alternated. The outer points must lay on a circle with radius R and the inner points must lay on a circle with radius r and all the points must be equally spaced. Print the area of the Shitalia. The first line contains three integers 3 ≤ n ≤ 20, 1 ≤ R ≤ 106 and 1 ≤ r ≤ R, indicating the number of points of Shitalia, the radius of the outer circle and the radius of the inner circle. Print a single real number - the answer to the problem with absolute or relative error of at most 10 - 6. ## Input The first line contains three integers 3 ≤ n ≤ 20, 1 ≤ R ≤ 106 and 1 ≤ r ≤ R, indicating the number of points of Shitalia, the radius of the outer circle and the radius of the inner circle. ## Output Print a single real number - the answer to the problem with absolute or relative error of at most 10 - 6. [samples]
**Definitions** Let $ R_1 = (a_1, b_1) $ and $ R_2 = (a_2, b_2) $ be two rectangles, where $ a_i, b_i \in \mathbb{Z}^+ $ denote their side lengths. **Constraints** $ 1 \le a_1, b_1, a_2, b_2 \le 10^3 $ **Objective** Determine whether one rectangle can be rotated and entirely contained within the other. That is, determine if either: $$ (\min(a_1, b_1) \le \min(a_2, b_2) \land \max(a_1, b_1) \le \max(a_2, b_2)) \quad \text{or} \quad (\min(a_2, b_2) \le \min(a_1, b_1) \land \max(a_2, b_2) \le \max(a_1, b_1)) $$
API Response (JSON)
{
  "problem": {
    "name": "A. Shitália",
    "description": {
      "content": "After suddenly becoming a billionaire, Shi adopted YOLO as his motto and decided to buy a small european island, which he named Shitalia. Many people decided to move to Shitalia to run away from the e",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 65536
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10073A"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "After suddenly becoming a billionaire, Shi adopted YOLO as his motto and decided to buy a small european island, which he named Shitalia. Many people decided to move to Shitalia to run away from the e...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ R_1 = (a_1, b_1) $ and $ R_2 = (a_2, b_2) $ be two rectangles, where $ a_i, b_i \\in \\mathbb{Z}^+ $ denote their side lengths.\n\n**Constraints**  \n$ 1 \\le a_1, b_1, a_2, b_2 \\le ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments