122 |
|
|
123 |
|
static void checkSorted(Long[] a) { |
124 |
|
int n = a.length; |
125 |
< |
long x = ((Long)a[0]).longValue(), y; |
125 |
> |
long x = a[0].longValue(), y; |
126 |
|
for (int i = 0; i < n - 1; i++) { |
127 |
< |
if (x > (y = ((Long)a[i+1]).longValue())) |
127 |
> |
if (x > (y = a[i+1].longValue())) |
128 |
|
throw new Error("Unsorted at " + i + ": " + x + " / " + y); |
129 |
|
x = y; |
130 |
|
} |
185 |
|
} |
186 |
|
int bound = h < n ? h : n - 1; |
187 |
|
int i = l; |
188 |
< |
long x = ((Long)a[i]).longValue(), y; |
188 |
> |
long x = a[i].longValue(), y; |
189 |
|
while (i < bound) { |
190 |
< |
if (x > (y = ((Long)a[++i]).longValue())) |
190 |
> |
if (x > (y = a[++i].longValue())) |
191 |
|
throw new Error("Unsorted " + x + " / " + y); |
192 |
|
x = y; |
193 |
|
} |