Logo
(追記) (追記ここまで)

21989번 - Equilibrium Point /\/\ 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 512 MB2510945.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}$.

제한

예제 입력 1

6 3.4 0.6

예제 출력 1

()(())

힌트

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > Northern Eurasia Finals 2020 (Offline) E번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /