In an archeology excavation in the Panda Land, the panda researchers found artifacts from the technologically advanced Bracket Panda civilization which lives around year 2008 BGP - Before Giant Panda. The artifacts are in the form of a big stone tablet with inscriptions on it (seems to be some kind of codes) and some locked treasure chests labeled as `bonus" by the ancient pandas, each chest have numbers inscribed on them as well as several switches labeled with
(' and `)'.
After much research and decoding, the researchers found the following results:
For larger values of N
The input consists of several cases. Each case contains three integer: N
$(1 \le N \le 31)$
-->
(1
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/629.png"
ALT="$ \le$">N
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/629.png"
ALT="$ \le$">31)
$(0 \le K < 2{N})$
-->
(0
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/629.png"
ALT="$ \le$">K < 2N)
$(1 \le M \le \min{10000, 2{N} - K})$
-->
(1
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/629.png"
ALT="$ \le$">M
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/629.png"
ALT="$ \le$">min{10000, 2N - K})
$N = K = M = 0$
-->
N = K = M = 0
For each case, output the correct combination of code required to open it (which is the substring from the N
3 0 6
3 4 4
3 5 2
3 6 1
3 7 1
0 0 0
(()(()
()))
))
)
)
Migrated from old NTUJ.
ACM ICPC regional Jakarta site 2008
No. | Testdata Range | Score |
---|