← All problemsSign in

Cyclopian Edges

CodeChefRating 3110Open on judge ↗

You are given a simple graph with $N$ nodes and $M$ edges. The graph may not be connected. Each edge in the graph has an integer weight assigned to it and each node is **coloured** either white or black. In one operation, you can choose an edge that has a white node at one end and a black node at the other, and reduce its weight by one. After this operation, the colour of both the nodes at the en

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start