names[i] is the badge owner's name and times[i] is the time of the swipe as "HH:MM" (24-hour clock). All records belong to the same day and come in no particular order.
The system raises an alarm for a person who swiped **three or more times within one hour**, meaning at most 60 minutes pass between the first and the last of those swipes. For example, "10:00" and "11:00" fit within an hour, while "22:51" and "23:52" do not.
Return the names of everyone who triggered the alarm, without duplicates, in alphabetical order.names=['vera', 'oleg', 'vera', 'oleg', 'vera', 'oleg'], times=['08:30', '09:00', '09:10', '09:45', '09:30', '10:01'] → ['vera']
vera swiped at 08:30, 09:10 and 09:30, all three within 60 minutes. oleg's first and third swipes are 61 minutes apart, so no alarm for him.
names=['kim', 'kim', 'kim', 'ann', 'ann', 'ann'], times=['23:00', '00:10', '23:59', '13:00', '13:30', '14:00'] → ['ann']
All times belong to one day, so 00:10 is early morning, not the next day: kim gets no alarm. ann's 13:00 and 14:00 are exactly an hour apart, which still counts.
times[i] looks like "HH:MM" with 00 ≤ HH ≤ 23 and 00 ≤ MM ≤ 59names[i], times[i]) appears twicenames=['vera', 'oleg', 'vera', 'oleg', 'vera', 'oleg'], times=['08:30', '09:00', '09:10', '09:45', '09:30', '10:01']
['vera']
Run checks the first 3 tests in your browser. Submit checks all 109 tests on the server, hidden ones included.