Hint for CHEFDELIVERY

Hi everyone,
I am trying this problem Contest Page | CodeChef
I am new to graph problems.
I cant formulate how much edges are needed to not travel a road again