[swexpert] 3289. 서로소 집합 (java, union-find 함수)
Posted by 해랑쓰 블로그 (Haerang's blog)
import java.util.Scanner; public class Solution { static int t,n,m; public static void main(String[] args) { Scanner sc=new Scanner(System.in); t=sc.nextInt(); for (int tc = 1; tc