Loading problem...
You are given an ActorDirector event table that stores one row per recorded collaboration between an actor and a director.
Columns:
Task:
Supported submission environments:
ActorDirector:
| actor_id | director_id | timestamp |
|----------|-------------|-----------|
| 1 | 1 | 0 |
| 1 | 1 | 1 |
| 1 | 1 | 2 |
| 1 | 2 | 3 |
| 1 | 2 | 4 |
| 2 | 1 | 5 |
| 2 | 1 | 6 |[
{"actor_id":1,"director_id":1}
]Pair (1, 1) appears three times, so it qualifies. Pairs (1, 2) and (2, 1) appear only twice.
ActorDirector:
| actor_id | director_id | timestamp |
|----------|-------------|-----------|
| 4 | 7 | 11 |
| 4 | 7 | 12 |
| 4 | 7 | 13 |
| 4 | 7 | 14 |
| 4 | 8 | 21 |
| 4 | 8 | 22 |
| 4 | 8 | 23 |
| 9 | 1 | 24 |[
{"actor_id":4,"director_id":7},
{"actor_id":4,"director_id":8}
]Pair (4, 7) appears 4 times and pair (4, 8) appears 3 times. Pair (9, 1) appears once.
ActorDirector:
| actor_id | director_id | timestamp |
|----------|-------------|-----------|
| 10 | 20 | 100 |
| 10 | 20 | 101 |
| 10 | 21 | 102 |
| 11 | 20 | 103 |
| 11 | 20 | 104 |
| 12 | 22 | 105 |[]No pair reaches three collaborations, so the output is empty.
Constraints