Beispiel #1
0
  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();
  }