left and right. Each row is a pair [id, points]: a player number and the points that judge awarded. Within each table player numbers are distinct and strictly increasing.
Combine the tables into one. Every player who appears in at least one table gets exactly one row [id, total], where total is the sum of their points from both judges (a player missing from a table counts as zero there). The result must also be sorted by id in ascending order.left=[[2, 10], [5, 7]], right=[[1, 4], [2, 6], [9, 3]] → [[1, 4], [2, 16], [5, 7], [9, 3]]
Player 2 is in both tables: 10 + 6 = 16. Everyone else appears once and is copied as is.
left=[[3, 1]], right=[[3, 999]] → [[3, 1000]]
The same player in both, so the points add up: [[3, 1000]].
left=[[4, 8], [6, 2]], right=[[1, 5]] → [[1, 5], [4, 8], [6, 2]]
[id, points]id values are strictly increasingleft=[[2, 10], [5, 7]], right=[[1, 4], [2, 6], [9, 3]]
[[1, 4], [2, 16], [5, 7], [9, 3]]
Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.