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

要及时返回 到最后一层 不论能不能 更新ans 都要 return 别跟我一样 .... 傻乎乎的 往下搜

Posted by ysymi at 2013-02-19 18:30:31 on Problem 1190
应该是这样的 


    if (depth == 0)
    {
        if (leftv == 0 && nows < ans)
            ans = nows;
        return;
    }

而不是 这样的

    if (depth == 0 && leftv == 0 && nows < ans))
    {        
            ans = nows;
        return;
    }

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