mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-03 04:44:53 +07:00
GitOrigin-RevId: 213471de9a6d623336673a3b968ec4724215012a
15 lines
332 B
Java
15 lines
332 B
Java
import java.util.Arrays;
|
|
|
|
class Test {
|
|
void foo(int[] a) {
|
|
int log = 0;
|
|
int temp = a.length;
|
|
while (1 << log < temp) {
|
|
log++;
|
|
}
|
|
int n = 1 << log;
|
|
int[] b = new int[2 * n];
|
|
System.arraycopy(a, 0, b, n, temp);
|
|
Arrays.fill(b, n + temp, 2 * n, -1);
|
|
}
|
|
} |