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的代码让高手们给我查错,真不好意思,我也用stl的heap+greedy

Posted by yuanyirui at 2007-04-03 09:28:16 on Problem 2431
In Reply To:第一次贴wa的代码让高手们给我查错,真不好意思,我也用stl的heap+greedy Posted by:yuanyirui at 2007-04-03 08:31:19
不好意思
if(s[i].lo>=cover){ // 这句的方向也反了
      sta[len++]=s[i].oil;  // 压堆 
      push_heap(sta,sta+len); 
}
else break; //少了这句

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