← All problemsSign in

Magical Candle

Chef has a magical candle of length $L$ which burns from both sides with different burning rates $X$ (from left) and $Y$ (from right). He lights both ends of the candle at the same time. Chef has $2$ queries for you to answer, which are defined as follows - Query 1: find the length from the left at which both the flames of rates $X$ and $Y$ meet. - Query 2: given a point $P$ which is of length $K

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start