#include <stdio.h> #include <stdlib.h>
// Define the maximum number of vertices #define MAX_VERTEX_NUM 20 // Define infinity #define INFINITY 65535
// Define the adjacency matrix int arc[MAX_VERTEX_NUM][MAX_VERTEX_NUM]; // Define an array to store the indegree of the node indegree[MAX_VERTEX_NUM]; // Define an array to store the results of topological sorting int tops[MAX_VERTEX_NUM];
//Initialize the adjacency matrix, indegree array void Init(in