You are given three integers X, Y and Z and two arrays A and B both of length N. You are also given an integer sum which is initially equal to 0. You must perform N operations and in each ith operation you must do only one of the following: 1. 2. 3. Subtract B[i] from sum. Decrease both of X and Y by 1, then add A[i] * X * Y *Z to sum. Decrease both of Y and Z by 1, then add A[i] * X * Y *Z to sum. However, after each operation, X, Y and Z must all remain greater than or equal to 0. Find the maximum sum you can obtain after performing all operations. Sample Input: 2 1 2 2 0 0 10 5 Sample output: 0 Explanation: Here, N = 2, X = 1, Y = 2, Z = 2 A = [0, 0] B = [10, 5] It is given that in starting, sum = 0 operation 1: Apply type 2 operation (i.e. Decrease both of X and Y by 1, then add A[1]*X*Y*Z to sum) X = 0, Y = 1, Z = 2 sum = sum + 0*0*1*2 = 0 operation 2: Apply type 3 operation (i.e. Decrease both of Y and Z by 1, then add A[2]*X*Y*Z to sum) X = 0, Y = 0, Z = 1 sum = sum + 0*0*0*1 = 0 Hence, answer is the final value of sum i.e. sum = 0.