
ZOJ Problem Set  2029
Cantor, the famous mathematician, was working on a problem about intervals. Let's start from a line segment of unit length. Remove its middle 1/3. Now remove the middle 1/3's from the remaining two segments. Now remove the middle 1/3's from the remaining four segments. Now remove the middle 1/3's from the remaining eight segments. Now remove ... well, you get the idea. If you could continue this procedure through infinitely many steps, what would you have left? Now he assigns the following task to you. (He asked me to pass his assignment
to you last night.)
There are several test cases.
For each B(i) in {B(m)}, output a line containing the interval [a,b).
3 3
[10,20)
Author: SHI, Xiaohan Source: ZOJ Monthly, November 2003 