Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:为什么总是WA,哪位帮忙看看啊In Reply To:为什么总是WA,哪位帮忙看看啊 Posted by:lsz at 2007-09-28 03:10:51 我的思路是先得出原来的括号串,然后计算括号的层数。从右括号向左搜索,如果遇到第一个层数比当然括号内的层数要少的地方,这就是对应的左括号的位置。例如: 6 4 5 6 6 6 6 ( ( ( ( ) ( ) ( ) ) ) ) 0 1 2 3 4 3 4 3 4 3 2 1 0 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator