Tom and Jerry
As usual, Tom is trying to catch Jerry. To accomplish this task, Tom hired $K$ other cats (Tom does not take part in the chase). Formally, they are in a graph $G$ with $N$ vertices and $M$ edges. Let's denote the set of vertices of $G$ by $V$. The graph has a special property: for each simple cycle containing at least four vertices, there is an edge which is not part of this cycle, but connects tw
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