Set Extension
CodeChefOpen on judge ↗
# Set Extension For a given set of two-dimensional points S, let's denote its extension E(S) as the result of the following algorithm: Create another set of two-dimensional points R, which is initially equal to S. Then, while there exist four numbers x1, y1, x2 and y2 such that (x1,y1)∈R, (x1,y2)∈R, (x2,y1)∈R and (x2,y2)∉R, add (x2,y2) to R. When it is impossible to find such four integers, let
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