0
Question
The Summed Absolute Difference (SAD) of two arrays. Given arrays (1-indexed) P and Q of lengths p and q.
Given a collection of n arrays A1, ..., An, report SAD(Ai, Aj) for several queries (i, j).
The first line of input contains a single positive integer n.
Each of the next n lines s...