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

一个想法,o(n)的

Posted by 2010201307 at 2012-03-28 17:08:40 on Problem 1828
找到x和y的最大值,如果xmax和ymax出于同一个猴子,则候选数必为1,因为别的猴子的x或者y肯定会有至少一个比这个猴子小的;
如果没有在同一个猴子身上,则判断有多少个x==xmax||y==ymax) ;
实现了就是o(n)的,如有错误,请各位大牛指正……

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