#C14001. Security Camera Motion Detection Simulation
Security Camera Motion Detection Simulation
Security Camera Motion Detection Simulation
This problem simulates a security camera system that monitors motion during designated active hours. The camera is configured with a sensitivity level and a detection area. When motion is detected, the camera logs a message with a timestamp, the motion details, the detection area, and the sensitivity setting. However, if the motion is detected outside the active hours, a simple message is returned instead.
The active hours condition is defined as follows:
\( \text{If } s < e: \; s \leq \text{current\_hour} < e \)
\( \text{Otherwise: } \text{current\_hour} \geq s \text{ or } \text{current\_hour} < e \)
inputFormat
The input consists of five lines:
- An integer representing the current hour (0 to 23).
- Two integers separated by a space, representing the start hour and end hour of the camera's active period (each between 0 and 23).
- An integer for the camera's sensitivity (from 1 to 10).
- A string representing the detection area (e.g., full_frame, region1).
- A string containing the motion information.
outputFormat
If the current hour falls within the active detection period, output a log message in the following format:
Motion detected at HH:00:00: <motion_info> in area <area> with sensitivity <sensitivity>
Otherwise, output:
Motion detected but out of active hours.## sample
21
20 6
5
full_frame
Unauthorized movement detected
Motion detected at 21:00:00: Unauthorized movement detected in area full_frame with sensitivity 5