#Q188. 「一本通 5.6 例 3」任务安排 3
「一本通 5.6 例 3」任务安排 3
Description
Original source: SDOI 2012
The input format and data range have been modified, while the rest remains the same as LOJ #10184. Task Arrangement 1.
Input Format
The first line contains two integers, and ;
The next lines each contain two integers and .
Data Range and Hints
For all data, $1\le N\le 3\times 10^5,1\le S\le 2^8,|T_i|\le 2^8,0\le C_i\le 2^8$.
Note that although represents time, in this problem may be negative.