15 |
|
static final Comparator<Object> cmp = (Object x, Object y) -> |
16 |
|
((Long)x).compareTo((Long)y); |
17 |
|
|
18 |
– |
|
18 |
|
public static void main(String[] args) throws Exception { |
19 |
|
int n = 1 << 22; |
20 |
|
int reps = 30; |
121 |
|
|
122 |
|
static void checkSorted(Long[] a) { |
123 |
|
int n = a.length; |
124 |
< |
long x = ((Long)a[0]).longValue(), y; |
124 |
> |
long x = a[0].longValue(), y; |
125 |
|
for (int i = 0; i < n - 1; i++) { |
126 |
< |
if (x > (y = ((Long)a[i+1]).longValue())) |
126 |
> |
if (x > (y = a[i+1].longValue())) |
127 |
|
throw new Error("Unsorted at " + i + ": " + x + " / " + y); |
128 |
|
x = y; |
129 |
|
} |
184 |
|
} |
185 |
|
int bound = h < n ? h : n - 1; |
186 |
|
int i = l; |
187 |
< |
long x = ((Long)a[i]).longValue(), y; |
187 |
> |
long x = a[i].longValue(), y; |
188 |
|
while (i < bound) { |
189 |
< |
if (x > (y = ((Long)a[++i]).longValue())) |
189 |
> |
if (x > (y = a[++i].longValue())) |
190 |
|
throw new Error("Unsorted " + x + " / " + y); |
191 |
|
x = y; |
192 |
|
} |