Circle and Many Triangles

AtCoder
IDs8pc_3_e
Time2000ms
Memory256MB
Difficulty
There is a circle which radius is 1. There are $N$ vertices on the circle's circumference. The vertices divides into $N$ equal parts over the circumference. ![image](https://atcoder.jp/img/s8pc-3/4ed4ec92efd07ab59a34520d6e7f1c02.png) You can choose $3$ distinct vertices, and you can make a triangle. There are $\\frac{N(N - 1)(N - 2)}{6}$ ways choosing vertices. The question is: Calculate the area of $K$-th smallest triangle in $\\frac{N(N-1)(N-2)}{6}$ triangles. If the area is same, you can order in any order. If $N = 4, K = 3$, the result is following: * If you select vertices $1$, $2$, and $3$, the area of triangle $= 1$. * If you select vertices $1$, $2$, and $4$, the area of triangle $= 1$. * If you select vertices $1$, $3$, and $4$, the area of triangle $= 1$. * If you select vertices $2$, $3$, and $4$, the area of triangle $= 1$. As a result, the 3rd smallest triangle's area $= 1$. [samples]
API Response (JSON)
{
  "problem": {
    "name": "Circle and Many Triangles",
    "description": {
      "content": "There is a circle which radius is 1.   There are $N$ vertices on the circle's circumference.   The vertices divides into $N$ equal parts over the circumference.   ![image](https://atcoder.jp/img/s8pc",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "s8pc_3_e"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There is a circle which radius is 1.  \nThere are $N$ vertices on the circle's circumference.  \nThe vertices divides into $N$ equal parts over the circumference.  \n\n![image](https://atcoder.jp/img/s8pc...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments