Walcott and Equivalence Relation
CodeChefOpen on judge ↗
Problem Statement Walcott has a set of N numbers, 0 to N-1. He defines a relation R on this set. His friend Sanchez wants to make it an equivalence relation. For that he adds least number of extra relations to make it an equivalence relation. Walcott picks a set of k numbers from his set. What is the probability that in the set of chosen k numbers, no two elements are related to each other? 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