MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / prepare

Method prepare

src/class174/Code05_Lcm1.java:150–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 public static void prepare() {
151 int log2n = 0;
152 while ((1 << log2n) <= (n >> 1)) {
153 log2n++;
154 }
155 blen = Math.max(1, (int) Math.sqrt(m * log2n));
156 bnum = (m + blen - 1) / blen;
157 sort(edge, ea, 1, m);
158 sort(query, qb, 1, q);
159 }
160
161 public static void main(String[] args) throws IOException {
162 FastReader in = new FastReader(System.in);

Callers 1

mainMethod · 0.95

Calls 3

sortMethod · 0.95
sqrtMethod · 0.80
maxMethod · 0.45

Tested by

no test coverage detected