P12602 [AOJ] Live Programming
普及
题目描述

Example

Input

2 10
10 200 1
10 100 100

Output

200

输入格式

见题面

输出格式

见题面

样例输入
2 10 10 200 1 10 100 100
样例输出
200