Wouldn't this give me intervals of B that are only covered once? For example, if I had:
A
1 1 10
1 17 20
B
1 5 10
1 15 20
Wouldn't this still give the answer I posted originally? I wouldn't want this because in this case the 15 - 17 interval comes from B, whereas I just want the intervals covered only by A.