← All problemsSign in

Romeo and Juliet

Romeo and Juliet are in a long distance relationship. They both are working in software industry. As a result, both of them are busy coding most of the days. There are in total N days ( numbered 1, 2, 3, ... , N ) and each day can be a working day for either Juliet or Romeo or both. Juliet is very brave and wants to skip exactly K continuous days to go and meet Romeo. But she wants to select thes

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