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:同问,牛人,指教啊!(第一次发现这种情况)

Posted by woshiniya at 2006-12-14 13:00:53 on Problem 1859
In Reply To:晕…… Posted by:041221125 at 2006-05-05 17:01:43
用的是<algorithm>里的sort。排序准则:
 if(a.x == b.x) return a.y < b.y;
return a.x < b.x;
 
 这样会TLE
 
 但是如果把准则改成:
 if(a.y == b.y) return a.x < b.x;
 return a.y < b.y;
 
 就过了。 太诡异了。想不通。请高人指点。
 貌似sort这个东西不稳定啊。。会退化?

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