Battlefield
CodeChefOpen on judge ↗
There is a game consisting of a battlefield which consists of N cities and R bidirectional roads. You are playing this game and your goal is to start at some city C of your choice and visit all R roads exactly once and the trip will end at C. Minimum number of additional roads to the initial set of roads should be added to make this trip feasible if it’s impossible. You are allowed to add roads be
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