133. Border time limit per test: 0.25 sec. Along the border between states A and B there are N defence outposts. For every outpost k, the interval [Ak,Bk] which is guarded by it is known. Because of financial reasons, the president of country A decided that some of the outposts should be abandoned. In fact, all the redundant outposts will be abandoned. An outpost i is redundant if there exists some outpost j such that Aj<Ai and Bi<Bj. Your task is to find the number of redundant outposts. Input The first line of the input will contain the integer number N (1<=N<=16 000). N lines will follow, each of them containing 2 integers: Ak and Bk (0<= Ak < Bk <= 2 000 000 000), separated by blanks. All the numbers Ak will be different. All the numbers Bk will be different. Output You should print the number of redundant outposts. Sample Input 5 Sample Output 3 |
#include <cstring>
|
相关文章
- 12-23快速切题 poj 2993 Emag eht htiw Em Pleh 模拟 难度:0
- 12-23快速切题sgu127. Telephone directory
- 12-23Win10快速离线安装PyTorch(CPU)版
- 12-23快速切题 sgu104. Little shop of flowers DP 难度:0
- 12-23【离线电商数仓】Day04-即席查询(Ad Hoc):Presto链接不同数据源查询、Druid建多维表、Kylin使用cube快速查询
- 12-23快速切题 sgu133.Border 离线
- 12-23【转】Microsoft .NET Framework 3.5 sp1 安装速度慢,快速离线安装的方法
- 12-23#离线#洛谷 5358 [SDOI2019]快速查询
- 12-23在Ubuntu上使用离线方式快速安装K8S v1.11.1
- 12-23离线消息如何实现?-- ESFramework 4.0 快速上手(02)