← 返回 linkedin 的题目列表CPU Execution Time Calculation
类型:online_judge
In a multithreaded environment, given log entries of task start and end timestamps, calculate 'inclusive time' and 'exclusive time' for each task. Implement calculate_execution_time(logs: List[str]) -> Dict[str, Tuple[int, int]], where each element of logs is a string representing the start time (in format "start:task_id:timestamp") or end time (in format "end:task_id:timestamp").
Example
Input
start:A:0
start:B:2
end:B:5
end:A:6