Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:过了的朋友看看这段代码错在哪?

Posted by bjtu1 at 2009-05-27 18:23:46 on Problem 1363
In Reply To:过了的朋友看看这段代码错在哪? Posted by:BirdEgg at 2007-02-16 20:20:54
 
错在这:
while(top > 0) {
				if(rail[top-1] == req[j++]) top--;
				else break;
			}


题目要求出栈后不能再入栈,你这样写就是可以再次入栈了。。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator