Question 1 / 2 (Amazon Campus(5): completely inside interval)
Given a set of open intervals, check whether there exists an interval which is completely inside another interval. If exists, print “1”, otherwise print “0”. You just need to consider the case that all the end points are integers and there are no exactly
the same open intervals.
Input:
n --- number of open intervals
a_1 b_1 a_2 b_2 ... a_n b_n ------ n open intervals (a_1, b_1) ... (a_n, b_n), in which a_i < b_i for ......
阅读全文