#K3721. Derived Array Sum
Derived Array Sum
Derived Array Sum
You are given two arrays a and b, each containing n integers. For each index i (0-based), define the derived array element c[i] = ( \max(a[i], b[i]) + \min(a[i], b[i]) ). Note that this formula is equivalent to ( c[i] = a[i] + b[i] ). Your task is to compute the array c and print its elements in order. This problem will test your ability to perform basic array manipulations and input/output handling commonly encountered in coding competitions.
inputFormat
The input is read from standard input (stdin) and consists of three lines. The first line contains a single integer n, the number of elements in each array. The second line contains n space-separated integers representing the array a. The third line contains n space-separated integers representing the array b.
outputFormat
Output to standard output (stdout) a single line that contains n space-separated integers, which are the elements of the derived array c.## sample
3
1 3 5
2 4 6
3 7 11