https://codeforces.com/contest/1624/problem/G시간 2초, 메모리 256MBinput :t (1 ≤ t ≤ 104)empty linen m (3 ≤ n ≤ 2 \* 105, n − 1 ≤ m ≤ 2 \* 105)vi ui wi