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

晕……

Posted by 041221125 at 2006-05-05 17:01:43 on Problem 1859
In Reply To:内详 Posted by:ANewStart at 2004-09-30 17:06:33
> 貌似这个题目相当的诡异。其实nlogn是可以过的。
> 我当时TLE了两次,一直没想通。
> 我用的是<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