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:我靠!我也TLE了

Posted by ykt at 2005-09-14 21:24:30 on Problem 1163
In Reply To:我靠!我也TLE了 Posted by:ykt at 2005-09-14 21:16:12
空间换时间才是王道啊

加了一个判断,
if(max[curPos]==0){
		leftValue=getMAX(root,columnNum,curLevel);
		rightValue=getMAX(root,columnNum+1,curLevel);	
	
		max[curPos]=((leftValue>rightValue)?leftValue:rightValue)+curValue;
	}
	
	return max[curPos];

就从TLE -> 0MS了


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