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

一个题把OLE,MLE,WA都遇到了,做得不爽的可以看下~

Posted by catcher_wang at 2009-10-01 13:53:06 on Problem 1145
递归输入,若为根节点则直接判断
关键是如何确定根节点:
  对输入函数加个返回值,若为()则返回true
  当左右递归的函数返回都为true,即为()()时,则可确定为根节点
还有输入的时候用scanf(" (%d",&num)与scanf(" )")即可,注意前面有空格!!

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