mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
14 lines
338 B
Java
14 lines
338 B
Java
import java.util.Arrays;
|
|
|
|
class Test {
|
|
void foo(int[] a) {
|
|
int log = 0;
|
|
while (1 << log < a.length) {
|
|
log++;
|
|
}
|
|
int n = 1 << log;
|
|
int[] b = new int[2 * n];
|
|
System.arraycopy(a, 0, b, n, <selection>a.length</selection>);
|
|
Arrays.fill(b, n + a.length, 2 * n, -1);
|
|
}
|
|
} |