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:偶数情况枚举,怎么都还还是WA?

Posted by lololo at 2005-12-25 21:13:49 on Problem 2718
In Reply To:偶数情况枚举,怎么都还还是WA? Posted by:lololo at 2005-12-25 20:17:48
晕,出现了一个小错误,

这一行: for(i=(A[0]==0?1:0);i<j;i++)  
                            ~~~~~应该是 i<j-1;
<j, 那么A[i+1]就会越界,汗,郁闷了半天。。。

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