← 返回 meta 的题目列表Task Manager with Filter and Sort
类型:online_judge
Design a task manager program with the following features:
Add a task: Each task should have a unique ID, name, priority, and deadline.
Delete a task: Remove a task by task ID.
Filter tasks: Filter the task list by priority or deadline.
Sort tasks: Sort tasks by priority or deadline.
Provide the full function requirements, along with several sample inputs and outputs for testing.
Example
Input
add_task 1 'Task 1' 1 '2023-10-10'\nadd_task 2 'Task 2' 2 '2023-10-11'\nadd_task 3 'Task 3' 1 '2023-10-09'\ndelete_task 2\nfilter_tasks priority 1\nsort_tasks deadline