Loading problem...
A workflow orchestration service splits each parent task into a numbered sequence of required subtasks.
You are given two relational tables:
For each task_id, required subtask IDs are the full contiguous range: 1, 2, 3, ..., subtasks_count
Each row in executed means that a specific subtask completed successfully.
Your objective is to report every missing (task_id, subtask_id) pair that should exist according to tasks but does not appear in executed.
Output requirements:
Supported submission environments:
tasks:
| task_id | subtasks_count |
|---------|----------------|
| 1 | 3 |
| 2 | 2 |
| 3 | 4 |
executed:
| task_id | subtask_id |
|---------|------------|
| 1 | 2 |
| 3 | 1 |
| 3 | 2 |
| 3 | 3 |
| 3 | 4 |[
{"task_id":1,"subtask_id":1},
{"task_id":1,"subtask_id":3},
{"task_id":2,"subtask_id":1},
{"task_id":2,"subtask_id":2}
]Task 1 is missing subtasks 1 and 3. Task 2 has no executed rows, so all required subtasks are missing. Task 3 is fully complete.
tasks:
| task_id | subtasks_count |
|---------|----------------|
| 10 | 5 |
executed:
| task_id | subtask_id |
|---------|------------|
| 10 | 1 |
| 10 | 3 |
| 10 | 5 |[
{"task_id":10,"subtask_id":2},
{"task_id":10,"subtask_id":4}
]Only subtasks 1, 3, and 5 were completed. The missing IDs from the required range 1..5 are 2 and 4.
tasks:
| task_id | subtasks_count |
|---------|----------------|
| 21 | 2 |
| 34 | 6 |
executed:
| task_id | subtask_id |
|---------|------------|
| 21 | 1 |
| 21 | 2 |
| 34 | 2 |
| 34 | 3 |
| 34 | 6 |[
{"task_id":34,"subtask_id":1},
{"task_id":34,"subtask_id":4},
{"task_id":34,"subtask_id":5}
]Task 21 has no missing subtasks. Task 34 requires 1..6, and the missing IDs are 1, 4, and 5.
Constraints