Decorations
CodeChefOpen on judge ↗
The controls team has come up with an idea of decorating BITS Goa on the occasion of Quark. The lighting can be considered as a connected graph G. All the edges initially are in the off state. The control team can choose vertex $u,v$. All the edges in the shortest path between $u$ and $v$ are toggled. If there are more than one sequence of shortest paths than the lexicographically smallest is cho
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