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

13个很明显的错误 全在里面写着

Posted by sasnzy at 2007-05-04 18:35:15 on Problem 3231
In Reply To:何以见得? Posted by:ziliang at 2007-05-04 17:47:51
You are download(1 缺少ing) some things using a software (Flashget, maybe), but suddenly you have to go away for something. So, you need a program to calculate when the tasks will complete.

Now you know every download's speed、(2 英文里没顿号)size and the (12 's后面不加the)max speed. When a task is over, the bandwidth he (3 不用he)used is distributed by other tasks. The speed of one task can never go beyond the max speed of this task, and all tasks' speed can never be larger than the total bandwidth.


Input


There are multiple cases in the input.

The first line of one case is two integers(4 "line is integer",语感问题), n and t (n<=100). n is the number of tasks, and t is the total bandwidth. There follows n lines, one line has three integers ,means the size of the download file, the initialize(5 应该用形容词) speed and the max speed. The input promises the sum of tasks' speed equals to the total bandwidth, the speed is not larger (13 speed很少用large来形容,改成higher不错)than the max speed.

The input is terminated by a zero.


Output
For each case first print "Case %:" in one line, % is the number of case(6 可数名词必须要冠词或者复数).
Then print n lines for n tasks, like this:
NO*:#s
* means the number of task, for the sequence of input; # means the finish(7 ) time of the task.



Hint


The bandwidth will never change if no task is finish (8 finished).

When a task finished, the bandwidth is distributed follow (9 肯定不是follow)this rule:
Every unfinished task which is not reach (10 does not reach) the max speed gets the same bandwidth; the total bandwidth can not be overflowed; every task's speed can not overflow its max speed; if there are bandwidth can be used, distribute it (11 it 不能对 are) .

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