← All problemsSign in

Compare the Time

Given two times, t1 and t2, in the 12-hour AM/PM format, we want to know which time occurs first during a day. For example, if t1 is 08:02PM and t2 is 06:51AM, then t2 occurs before . Solve queries where each query consists of some t1 and t2. For each query, print First if t1 occurs before ; otherwise, print Second. Problem description. Note: The day starts at 12:00AM (midnight) and ends at 11:

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