Limited Queries
CodeChefOpen on judge ↗
The goal is to perform Q queries for a given linked graph G with N vertices and M undirected weighted edges, each belonging to one of the three forms below: AssignZero(u, v):= The edge weight between vertices u and v is modified to zero. It is guaranteed that in the graph G there is an edge between vertex u and v. AssignOriginal(u, v):= Reset the edge weight to its original weight between vertic
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