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

Method main

src/class117/Code01_FlagPlan.java:43–67  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

41 public static int n, m;
42
43 public static void main(String[] args) throws IOException {
44 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
45 StreamTokenizer in = new StreamTokenizer(br);
46 PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
47 in.nextToken();
48 n = (int) in.nval;
49 in.nextToken();
50 m = (int) in.nval;
51 for (int i = 1; i <= n; i++) {
52 line[i][0] = i;
53 in.nextToken();
54 line[i][1] = (int) in.nval;
55 in.nextToken();
56 line[i][2] = (int) in.nval;
57 }
58 compute();
59 out.print(ans[1]);
60 for (int i = 2; i <= n; i++) {
61 out.print(" " + ans[i]);
62 }
63 out.println();
64 out.flush();
65 out.close();
66 br.close();
67 }
68
69 public static void compute() {
70 power = log2(n);

Callers

nothing calls this directly

Calls 5

computeMethod · 0.95
printMethod · 0.45
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected