this hard version problem the difference version constraint n you hack version problem solvedA forest undirected graph cycle necessarily connectedMocha Diana friend Zhijiang forest node number 1 n like add edge forest after add edge graph forest they add edge that edge u v add Mochas forest edge u v add Dianas forest vice versa Mocha Diana want know maximum number edge add edge add