{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given a string consisting of parentheses () and []. A string of this type is said to be correct:\u003cbr\u003e\u003cbr\u003e\n(a) if it is the empty string\u003cbr\u003e\n(b) if A and B are correct, AB is correct,\u003cbr\u003e\n(c) if A is correct, (A) and [A] is correct.\u003cbr\u003e\u003cbr\u003e\nWrite a program that takes a sequence of strings of this type and check their correctness. Your\nprogram can assume that the maximum string length is 128. Note that the input may contain several arbitary whitespaces (that should not be processed) and may be empty.\n\u003c/p\u003e\n\u003ch5\u003eInput\u003c/h5\u003e\n\u003cp\u003eA positive integer \u003cvar\u003e\\(N\\)\u003c/var\u003e followed by \u003cvar\u003e\\(N\\)\u003c/var\u003e strings in separate lines.\u003c/p\u003e\n\u003ch5\u003eOutput\u003c/h5\u003e\n\u003cp\u003ePrint \u003cb\u003eYes\u003c/b\u003e is the string is correct, otherwise print \u003cb\u003eNo\u003c/b\u003e.\u003c/p\u003e\n\u003ch5\u003eSample input\u003c/h5\u003e\n\u003cp\u003e3\u003cbr\u003e\n([])\u003cbr\u003e\n(([()])))\u003cbr\u003e\n([()[]()])()\u003c/p\u003e\n\u003ch5\u003eSample output\u003c/h5\u003e\n\u003cp\u003eYes\u003cbr\u003e\nNo\u003cbr\u003e\nYes\u003c/p\u003e"}}]}