4041424344454647484950
} } else { if (ret.size() == 0 || ret.get(ret.size() - 1).end < it.start) ret.add(it); else { Interval tmp = ret.get(ret.size() - 1); tmp.end = Math.max(tmp.end, it.end); } } }