eggBreak
CodeChefOpen on judge ↗
Suppose that we wish to know which stories in a 36-story building are safe to drop eggs from, and which will cause the eggs to break on landing. We make a few assumptions: - An egg that survives a fall can be used again. - A broken egg must be discarded. - The effect of a fall is the same for all eggs. - If an egg breaks when dropped, then it would break if dropped from a higher floor. If an
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