1632: 5017. 垦田计划

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:5

Description


二分、差分、贪心都可以求解!

Input

Output

Sample Input Copy

4 9 2
6 1
5 1
6 2
7 1

Sample Output Copy

5

HINT



Source/Category