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 jcf at 2010-08-21 16:00:40 on Problem 1328
发帖的大牛们,谢谢了,看了你们写的一些注意事项,一次AC


写一下我的思路吧
先做出每个点的区间
qj[i].l   qj[i].r
按r进行排序
然后开始贪心:
设置一个lastpoint变量,记录上一个点的位置(初值为负无穷)
循环判断
如果lastpoint<l,则雷达数加1,修改lastpoint为r

中途注意判断是否成立,否则输出雷达数-1

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