1174: Necklace Decomposition
内存限制:64 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:1
解决:1
题目描述

输入
On the first line of the input is a single positive integer n, telling the number of test scenarios to follow. Each scenario consists of one line containing a non-empty string of zeros and ones of length at most 100.
输出
For each scenario, output one line containing the necklace decomposition of the string. The necklaces should be written as '(' necklace ')'.
样例输入 复制
5
0
0101
0001
0010
11101111011
样例输出 复制
(0)
(0101)
(0001)
(001)(0)
(111)(01111)(011)