[swexpert] 3289. 서로소 집합 (java, union-find 함수)

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