{"trustable":false,"sections":[{"title":"剧情","value":{"format":"HTML","content":"给定一串由( )和[ ]组成的字符串。如果我们规定以下的字符串是合法的字符串:\u003cbr\u003e\n(1) 空串是合法的\u003cbr\u003e\n(2) 如果A、B都是合法的,那么AB也是合法的。\u003cbr\u003e\n(3) 如果A是合法的,那么(A)和[A]都是合法的。\u003cbr\u003e\u003cbr\u003e\n也就是说,所有左右括号必须配对,且不能“切开括号”(如“[ ( ] )”或“( [ ) ]”)。"}},{"title":"输入","value":{"format":"HTML","content":"输入先是一个正整数n,代表有n个字符串。\u003cbr\u003e\n接下来是n行串,每个串一行,注意,可能有空串。"}},{"title":"输出","value":{"format":"HTML","content":"对于每组数据,若是合法的串,则在单独的一行输出Yes,不然则出No。"}},{"title":"样例","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e输入\u003c/th\u003e\n \u003cth\u003e输出\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\n([])\n(([()])))\n([()[]()])()\n(([(])))\n\n()[][()]\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\nNo\nYes\nNo\nYes\nYes\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}