Count ways to generate N-length array with 0s, 1s, and 2s such that sum of all adjacent pairwise products is K
Given two integers N and K, the task is to find the number of N-length arrays that can be generated by using the values 0, 1, and 2 any number of times, such that the sum of all adjacent pairwise products of the array is K. Examples: Input: N = 4, K = 3Output: 5Explanation: All possible arrangements