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

Method main

src/class174/Code05_Lcm1.java:161–192  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

159 }
160
161 public static void main(String[] args) throws IOException {
162 FastReader in = new FastReader(System.in);
163 PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
164 n = in.nextInt();
165 m = in.nextInt();
166 for (int i = 1; i <= m; i++) {
167 eu[i] = in.nextInt();
168 ev[i] = in.nextInt();
169 ea[i] = in.nextInt();
170 eb[i] = in.nextInt();
171 edge[i] = i;
172 }
173 q = in.nextInt();
174 for (int i = 1; i <= q; i++) {
175 qu[i] = in.nextInt();
176 qv[i] = in.nextInt();
177 qa[i] = in.nextInt();
178 qb[i] = in.nextInt();
179 query[i] = i;
180 }
181 prepare();
182 for (int i = 1, l, r; i <= bnum; i++) {
183 l = (i - 1) * blen + 1;
184 r = Math.min(i * blen, m);
185 compute(l, r);
186 }
187 for (int i = 1; i <= q; i++) {
188 out.println(ans[i] ? "Yes" : "No");
189 }
190 out.flush();
191 out.close();
192 }
193
194 // 读写工具类
195 static class FastReader {

Callers

nothing calls this directly

Calls 6

nextIntMethod · 0.95
prepareMethod · 0.95
computeMethod · 0.95
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected