java
美丽的陈莉莉
这个作者很懒,什么都没留下…
展开
-
JAVA实现并查集类
public class Unifind{ private int[] fa; private int[] rank; public Unifind(int n) { this.fa=new int[n]; this.rank = new int[n]; for(int i=0;i<n;i++) { this.原创 2021-01-12 11:13:52 · 147 阅读 · 0 评论 -
Java实现链式向前向星与spfa
import java.util.*; class node{ int to; int v; int next; int form; } public class hello{ static int [] head= new int [10000]; static int cnt=0; static int [] inq = new int [10000]; static node [] e =new node[10000]; st.原创 2020-06-17 12:14:34 · 227 阅读 · 0 评论