Edge Count
CodeChefOpen on judge ↗
You are given an undirected connected weighted graph with N vertices and M edges that does not contain any self-loops or double edges. Double edges are two edges such that (ai,bi) = (aj,bj) where 1 Input First line contains 2 integer N and M. Next M lines contains 3 integers ai,bi,ci where (ai,bi) represents edge and ci is the weight of that edge. Output Output single integer representing nu
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start