Given a graph as an adjacency matrix, calculate the total number of distinct simple cycles.
Remember that
Input Specification
The adjacency matrix -
The first row represents the first vertex, and similarly the last row represents the last vertex.
Output Specification
The number of distinct simple cycles of any length.
Sample Input
Copy
3
0 1 0
0 0 1
1 0 0
Sample Output
Copy
1
Comments