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 jackjie at 2011-10-02 17:42:32 on Problem 3190
按开始时间排序,然后从最早开始的牛加入堆中,堆按结束时间维护。每次加入的时候和堆顶比较,如果可以共用,那么把这个节点的结束时间更新,然后这新加的头牛的房间号置为堆顶的这头一样的,然后维护这个节点。这样找下去。然后再按输入的时候的顺序再排序输出房间号就好了。

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