Consider a case where you have [5 , 10) already stored in the map and trying to add [3, 5). The expected result would be only [3, 10) store in the map. However, using map.subMap(left, false, right, false) in method addRange(), you would end up with two intervals stored in the map, [3, 10) and [5, 10), leading to a case with overlapped intervals, which is not expected.
Though it could pass OJ, this testcase would lead to a bug. Please try it yourself to see if your result is different from OJ.