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

C题题目大意

Posted by ecust_linpeng at 2009-10-18 10:10:24
In Reply To:宁波的现场boaring Posted by:ecust_linpeng at 2009-10-18 08:49:55
占座游戏。
给出n*m个座位以及每个座位的舒适程度(n,m<=30)
k个学生过来占座(k<50)
每个学生的描述是来的时间和需要占座的座位数q(帮助朋友占座位,座位必须都在同一排,且必须是连续的)。
每个座位被占了就不能两个人占据。
每个来占座的将会坐在一排的最左边,他会选择让这个座位舒适程度最高的方案。
如果占不到q个满足条件的座位,他会选择不帮朋友占座,自己选择一个舒适程度最高的座位做下。
输出k行,对应这个学生所坐的位置,如果没位置了,输出-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