#P12904. [NERC 2020] Equilibrium Point /\/\

    ID: 12675 Type: RemoteJudge 3000ms 512MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>2020Special JudgeICPCNERC/NEERC

[NERC 2020] Equilibrium Point /\/\

题目描述

Consider a balanced bracket sequence ss with one type of brackets: (\tt{(} and )\tt{)}.

There is a common geometrical representation of such a sequence. Starting at the point (0,0)(0, 0), you draw a polyline, for each bracket moving along a vector (1,1)(1, 1) if it is an opening bracket, and along (1,1)(1, -1) if it is a closing bracket.

Consider an area between this curve and the line y=0y=0. It is a set of polygons. This area has its center of mass at some point (x,y)(x, y). Note that the center of mass might be outside of the area.

You are to solve the reverse problem. Given the length nn and a point (x,y)(x, y), find any balanced bracket sequence of length nn such that the center of mass of its geometrical representation is located at (x,y)(x, y).

输入格式

The first line contains three numbers nn, xx, and yy (nn is an even integer, 2n362 \le n \le 36; 0<x,y<n0 < x, y < n) --- the length of the desired sequence and the coordinates of the desired center of mass.

It is guaranteed that (x,y)(x, y) is the center of mass of some balanced bracket sequence of length nn, with Euclidean-distance error of no more than 10910^{-9}.

输出格式

Output a balanced bracket sequence with brackets (\tt{(} and )\tt{)} of length nn such that the center of mass of its geometrical representation is located at the point (x,y)(x, y), with Euclidean-distance error of no more than 10710^{-7}.

6 3.4 0.6
()(())