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

Method main

src/class194/Code04_Blockade1.java:204–225  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

202 }
203
204 public static void main(String[] args) throws Exception {
205 FastReader in = new FastReader(System.in);
206 PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
207 n = in.nextInt();
208 m = in.nextInt();
209 cntn = n;
210 for (int i = 1, u, v; i <= m; i++) {
211 u = in.nextInt();
212 v = in.nextInt();
213 addEdge1(u, v);
214 addEdge1(v, u);
215 }
216 // tarjan1(1);
217 tarjan2(1);
218 // dpOnTree1(1, 0);
219 dpOnTree2(1, 0);
220 for (int i = 1; i <= n; i++) {
221 out.println(ans[i]);
222 }
223 out.flush();
224 out.close();
225 }
226
227 // 读写工具类
228 static class FastReader {

Callers

nothing calls this directly

Calls 7

nextIntMethod · 0.95
addEdge1Method · 0.95
tarjan2Method · 0.95
dpOnTree2Method · 0.95
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected