Help in graph problem
Please help in building solution
Codeforces Round 941 (Div 1 + 2) Solution Discussion (with Jan)