2009_10-5_Practice1 C
来源:互联网 发布:阐教 截教 知乎 编辑:程序博客网 时间:2024/04/29 09:42
<!--@page { margin: 2cm }P { margin-bottom: 0.21cm }-->
IntervalChallenge
TimeLimit: 6000/2000 MS (Java/Others) MemoryLimit: 65536/32768 K (Java/Others)
Total Submission(s): 0 Accepted Submission(s): 0
ProblemDescription
Giveyou N ( 1 <= N <= 200000 ) intervals, represented as [A, B],for example , interval s represented as [As, Bs].
Fortwo intervals s and t, we say S covered by T if At <= As and Bs<= Bt.
Nowmy problem is easy, just tell me the question below:
Foreach interval, how many intervals can cover it but not covered by it?
Input
Theinput contains multiple test cases.
For each test case, the firstline is an integer N ( 1 <= N <= 200000 ), which is the numberof intervals. Then come N lines, the i-th of which contains twointegers: Ai andBi ( Ai , Biwill not exceed the unsigned 32-bit integer) specifying the two parameters describedabove.
Output
Foreach test case, output one line containing n space-separatedintegers, the i-th of which specifying the number of intervals thatcan cover it but not covered by it.
SampleInput
3
01
-12
-23
2
01
01
SampleOutput
21 0
00
Author
WhereIsHeroFrom
- 2009_10-5_Practice1 C
- 2009_10-5_Practice1 E
- ?[C++_10]RTTI
- c++_10: 异常处理
- c++_10: string类
- 《C和指针》练习题~9.14_10 palindrome()
- 工作总结_10
- 重载赋值运算符返回reference to *this(Effective C++_10)
- Eclipse报错 due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 解决方案
- Eclipse报错 due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 解决方案
- Eclipse报错:due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar
- FPGA_Embedded_9_9~9_10
- 今日总结11_10
- Linux文件系统笔记_10
- 黑马程序员_10 UDP
- windows8.1_10.17
- 黑马程序员_10多线程
- 总结_10-28
- 程序
- 毛主席语录
- Supporting a Printer-Friendly Page Button (Part I)
- Irrlicht3d编程的两个常见错误解决
- 2009_10-5_Practice1 E
- 2009_10-5_Practice1 C
- irrlicht中的数据类型
- 房市最佳购买时点在11月中至春节之前
- 怒揭黑莓市场黑幕,还消费者公道
- 网络技术中的tcp/ip协议如何学习,才能理解的更深?
- 传文件选MSN还是QQ? 揭秘IM传输工作原理
- [Linux学习笔记]目录、路径、文件、目录常用命令
- 永州阳明山林家铺子大酒店
- WPF:父窗口与子窗口的层次关系