E - Beta tumse na ho payega
CodeChefOpen on judge ↗
You are given a directed graph with $N$ vertices and $M$ edges. Let $F(X)$ be the minimum number of edges added to graph so that there is path from $Vertex $ $X$ to every $Vertex$ $Y(1 $F(1)$ - No extra edge required $F(2)$ - If we add edge from Vertex 2 to Vertex 1 then we can reach any vertex from Vertex 2 $F(3)$ - edge added (3, 1) $F(4)$ - edge added (4, 1) $F(5)$ - edge added (5, 1)
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