static int[] intRangeEnds(L l) { int n = l(l); int[] a = new int[n]; for i to n: a[i] = l.get(i).end; ret a; }