Problem B
Deterministic Finite Automata - Complement
You are given a deterministic finite automaton that accepts
the language
Input
The first line of inputs contains two positive integers
Each state is an integer between
Output
Output any deterministic finite automaton representing the complement of the input automaton. Your output is subject to the same format and restrictions as the input.
Sample Input 1 | Sample Output 1 |
---|---|
3 2 1 1 ab 1 1 2 1 3 3 3 |
4 2 1 3 ab 2 3 4 1 2 1 3 3 4 4 3 |
Sample Input 2 | Sample Output 2 |
---|---|
1 4 1 0 acgt 1 1 1 1 |
1 4 1 1 acgt 1 1 1 1 1 |