https://codeforces.com/contest/1213/submission/125901313
Where my logic is wrong i’m simply calculation nC2 for connected Component of Graph for particular weight less than equal to wi;
Also didn’t get what pulkid sir have done in unite function
int rtval = size[ur]*size[vr];
What rtvasl representing not got it ??