5628: BZOJ1628:[Usaco2007 Demo]City skyline

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description


输入格式

第一行给出N,W 第二行到第N+1行:每行给出二个整数x,y,输入的x严格递增,并且第一个x总是1


输出格式

输出一个整数,表示城市中最少包含的建筑物数量


样例输入

10 26
1 1
2 2
5 1
6 3
8 1
11 0
15 2
17 3
20 2
22 1

INPUT DETAILS:

The case mentioned above


样例输出

6

提示

没有写明提示


题目来源

Silver

加入题单

算法标签: