| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 3 초 | 512 MB | 25 | 10 | 9 | 45.000% |
Consider a balanced bracket sequence $s$ with one type of brackets: `(' and `)'.
There is a common geometrical representation of such a sequence. Starting at the point $(0, 0),ドル you draw a polyline, for each bracket moving along a vector $(1, 1)$ if it is an opening bracket, and along $(1, -1)$ if it is a closing bracket.
Consider an area between this curve and the line $y=0$. It is a set of polygons. This area has its center of mass at some point $(x, y)$. Note that the center of mass might be outside of the area.
You are to solve the reverse problem. Given the length $n$ and a point $(x, y),ドル find any balanced bracket sequence of length $n$ such that the center of mass of its geometrical representation is located at $(x, y)$.
The first line contains three numbers $n,ドル $x,ドル and $y$ ($n$ is an even integer, 2ドル \le n \le 36$; 0ドル < x, y < n$) --- the length of the desired sequence and the coordinates of the desired center of mass.
It is guaranteed that $(x, y)$ is the center of mass of some balanced bracket sequence of length $n,ドル with Euclidean-distance error of no more than 10ドル^{-9}$.
Output a balanced bracket sequence with brackets `(' and `)' of length $n$ such that the center of mass of its geometrical representation is located at the point $(x, y),ドル with Euclidean-distance error of no more than 10ドル^{-7}$.
6 3.4 0.6
()(())