Two positive integer sequences of length N are given: A1,A2,…,AN and B1,B2,…,BN. For every ordered pair (i,j) with 1≤i≤N and 1≤j≤N, compute the following two values.
- The remainder of the sum of all (Ai&Bj) divided by 1999
- The bitwise AND of all (Ai+Bj) values
& is bitwise AND. Its definition is in the Hint section.