Kinda sad, but I'm probably going to going back to pupil. I messed up pretty badly on the second problem and was overthinking during the process.
On the third problem, there was an interesting solution that involved a greedy approach that was pretty cool, but on the fourth problem, I got too greedy. I had 30 min on the clock, definitely not enough time for a C problem, but I thought of an O(N) solution that could pass both D1 and D2. Maybe, just maybe I could do it...
Pretests Failed
When it was the last moment, I hurried and tried the brute force approach involving doing all possible edges (using information from Union Find), but couldn't make it in time. I was really close. I knew that the optimal solution had to involve a tree, and required all vertices to be in their own set. Sadly, this info was not enough.
Oh well, I will get specialist back soon, and I'll learn from my mistakes. It was still a fun contest nevertheless, and happy with what I've got.
Oh yeah, I've got school now so I may not be able to practice that much. RIP