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

跪求各位大牛解释WA

Posted by jki14 at 2011-08-24 15:43:32 on Problem 2774
用这段代码 WA了
if( (sa[i]-na)*(sa[i-1]-na)<0  && hig[i]>ans )ans=hig[i];

仅修改这段代码为下 就 AC了   求解释啊!!!
if( ((sa[i]<na && sa[i-1]>na) || (sa[i]>na && sa[i-1]<na))  && hig[i]>ans )ans=hig[i];

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