Zero-sum picks from four lists
Given four lists of integers a, b, c and d, count the ways to choose one position in each list, i, j, k and l, so that a[i] + b[j] + c[k] + d[l] == 0. Choices are told apart by position: equal values at different positions are different choices. The lists may have different lengths; if one is empty, the answer is 0.
For lists of length n, aim for O(n²).
Besides the tests, one large input (four lists of 150 numbers) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
count_zero_picks([1,-1], [2,0], [-2,1], [0,-1])→2count_zero_picks([0], [0], [0], [0])→1count_zero_picks([1,1], [-1], [0,0], [0])→4