U176577 [advertisement1]Online Judge
题目描述
One day,a boy in ChongQing No.1 Secondary School who has called Alex created an online judge which has named as [Centersoft OJ](http://106.52.255.18/).Soon after,there were loads of students getting into the Centersoft OJ.They registered their own accounts,and they solved too many IT problems.As everyone knows,solving too many problems leads to the fragile servers crash.Alex's server is fragile,so it will crash in few hours.
In particular,there are $K$ students who registered their own account.$(1 \leq K \leq 10^6)$For each student,they'd like to be online between $x_i$ o'clock and $y_i$ o'clock.$(0 \leq x_i \leq y_i \leq 24)$And the $i$th student can solve $v_i$ questions in 1 hour.$(1 \leq v_i \leq 10^6)$In some special way,we can know that Alex's server can only afford $N$ problem-solving now.$(1 \leq N \leq 10^{12})$The time is now 00:00,for you,to be the friend of Alex,you should tell him how long his server can keep running.The answer is $X$ hours.$(X> 0)$
输入格式
The first line of input contains $K$ and $N$.In the $K$ lines that follow,the $i$th line contains $x_i$ , $y_i$ and $v_i$.These values are not necessarily all distinct.
输出格式
The ouput contains only one line.The only line of output contains $X$.You should use $\LaTeX$ to print the output.$($ "\frac{a}{b}" refers to $\frac{a}{b} $,and you should turn the fraction into lowest term $)$ Note that the datas might be too large to fit into a standard 32-bit integer, so you may need to use large integer data types like a "long long" in C/C++.