import java.io.BufferedReader;
import java.io.FileReader;
public class GraphDFS {
static int clock = 1;
public static void main(String[] args){
try{
int vertexNum=13,arcNum=13;//顶点数,边数
int vertex[]=new int[vertexNum];//顶点
int arc[][] = new int[vertexNum][vertexNum];//用来记录边的关系
int preVisit[] = new int[vertexNum];//存放各顶点的pre值
int postVisit[] = new int[vertexNum];//存放各顶点的pos值
boolean visite[] = new boolean[vertexNum];//存放该顶点是否被访问
FileReader f = new FileReader("C:/Users/Y470/Desktop/tinyG.txt");
BufferedReader br = new BufferedReader(f);
for(int i=0;i<vertexNum;i++){//初始化顶点信息
vertex[i] = i;
}
//初始化顶点间边的信息
for(int i=0;i<vertexNum;i++){
for(int j=0;j<ve
import java.io.FileReader;
public class GraphDFS {
static int clock = 1;
public static void main(String[] args){
try{
int vertexNum=13,arcNum=13;//顶点数,边数
int vertex[]=new int[vertexNum];//顶点
int arc[][] = new int[vertexNum][vertexNum];//用来记录边的关系
int preVisit[] = new int[vertexNum];//存放各顶点的pre值
int postVisit[] = new int[vertexNum];//存放各顶点的pos值
boolean visite[] = new boolean[vertexNum];//存放该顶点是否被访问
FileReader f = new FileReader("C:/Users/Y470/Desktop/tinyG.txt");
BufferedReader br = new BufferedReader(f);
for(int i=0;i<vertexNum;i++){//初始化顶点信息
vertex[i] = i;
}
//初始化顶点间边的信息
for(int i=0;i<vertexNum;i++){
for(int j=0;j<ve