Imagine you're working as a payroll manager at a company where employees must meet specific monthly work hour requirements to receive their full salary. Your task is to identify which employees should face salary deductions due to insufficient work hours.
You have access to two key pieces of information:
- Employee Requirements: Each employee has a minimum number of hours they must work monthly
- Work Session Logs: Detailed timestamps of when employees clock in and out
Here's the twist: work sessions are rounded up to the nearest minute. So if an employee works 51 minutes and 2 seconds, it counts as 52 minutes. Sessions can even span midnight!
Your Goal: Return the employee_id of all employees who didn't meet their required work hours in October 2022.
Example: If Employee 1 needs 100 hours but only worked 95.5 hours total across all sessions, they should be flagged for deduction.
Input & Output
Constraints
- 1 โค employee_id โค 104
- 1 โค needed_hours โค 50
- 1 โค Number of employees โค 500
- 1 โค Number of log entries โค 104
- All timestamps are in October 2022
- out_time can be up to one day after in_time (overnight shifts)
- Each session duration is at least 1 minute