Company: Walmart sparkplug
Difficulty: medium
Building a Structure You need to construct a structure using various types of building blocks. Each block type is represented by a specific integer value, has some weight associated with them, and each block available in limited quantity. Your objective is to find the minimum number of blocks required to exactly achieve a specified target value for the structure. Additionally, the total weight of the blocks used must not exceed a given weight capacity. Input Format The first line contains a single integer N, representing the number of different types of building blocks. The second line contains N space-separated integers, where the i-th integer represents the value of the i-th block. The third line contains N space-separated integers, where the i-th integer represents the maximum quantity of the i-th block that can be used. The fourth line contains N space-separated integers, where the i-th integer represents the weight of the i-th block. The fifth line contains a single integer target