principal 已经提交 已经通过 23.66% Total Submission:131 Total Accepted:31 题目描述 阿尔比恩王国潜伏着代号白鸽队''的一群间谍.在没有任务的时候,她们会进行各种各样的训练,比如快速判断一个文档有没有语法错误,这有助于她们鉴别写文档的人受教育程度. 这次用于训练的是一个含有nn个括号的文档.括号一共有mm种,每种括号都有左括号和右括号两种形式.我们定义用如下的方式定义一个合法的文档: 1.一个空的字符串是一个合法的文档. 2.如果A,B都是…
Description We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) and [s] are regular brackets sequences, and if a and b are regul…