public static void main(String args[]) throws Exception { int testCases = Integer.parseInt(in.readLine()); for (int i = 0; i < testCases; i++) { char[] path = in.readLine().toCharArray(); output(path); out.println(); } out.flush(); }
public static void main(String args[]) throws Exception { StringTokenizer tokenizer = new StringTokenizer(in.readLine()); int n = Integer.parseInt(tokenizer.nextToken()), m = Integer.parseInt(tokenizer.nextToken()); Graph graph = new Graph(n, m); for (long i = 0; i < m; i++) { tokenizer = new StringTokenizer(in.readLine()); int from = Integer.parseInt(tokenizer.nextToken()), to = Integer.parseInt(tokenizer.nextToken()); graph.connect(from, to); } output(graph, n); out.println(); out.flush(); }
public static void main(String args[]) throws Exception { int testCases = Integer.parseInt(in.readLine()); for (int i = 0; i < testCases; i++) { StringTokenizer tokenizer = new StringTokenizer(in.readLine()); int n = Integer.parseInt(tokenizer.nextToken()); Party party = new Party(); for (int j = 0; j < n; j++) { Person person = new Person(j); tokenizer = new StringTokenizer(in.readLine()); while (tokenizer.hasMoreTokens()) person.add(Integer.parseInt(tokenizer.nextToken())); party.invite(person); } output(party); out.println(); } out.flush(); }