Chef and Pairs
CodeChefOpen on judge ↗
We define a function maxMatching(A, B, y), which takes two arrays of integers, A and B, an integer y, and returns an integer. The function is described as follows: Let N be the size of array A, and M be the size of array B. Consider a bipartite graph with one side having the vertices {a1, a2, ..., aN}, and the other side having the vertices {b1, b2, ..., bM}. There is an edge between ai and bj if
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