#Q187. 「一本通 5.6 例 2」任务安排 2

「一本通 5.6 例 2」任务安排 2

Description

Original source: IOI 2002

Only the data range has been modified, the rest is the same as LOJ #10184. Task Arrangement 1.

Data Range and Hints

For all data, 1N104,0S50,1Ti,Ci1001\le N\le 10^4,0\le S\le 50,1\le T_i,C_i\le 100.