Пример #1
0
  static void read_automata_defined() {
    for (int i = 0; i < N; i++) {
      int sj = fio.nextInt();

      for (int j = 0; j < M; j++) {
        int h = fio.nextInt();
        for (int k = 0; k < h; k++) states[fio.nextInt()].addEdge(j, sj);
      }
      fio.nextLine();
    }
  }
Пример #2
0
  static void read_data() {
    shortest.length = Integer.MAX_VALUE;
    longest.length = Integer.MIN_VALUE;

    N = fio.nextInt();
    M = fio.nextInt();

    states = new Node[N];

    FIRST = states[0] = new Node(0);

    for (int i = 1; i < N; i++) states[i] = new Node(i);

    Q = fio.nextInt() == 1;

    fio.nextLine();

    if (Q) read_automata_defined();
    else read_automata_generated();
    read_terminals();
  }