int dp[6][6][6][6][6]; // 2nd dimension stores the offer price as element 0, (normalized) product // code as element 1, 2, 3, 4, 5. vector<vector<int>> offer(106, vector<int>(6, 0)); // Normalize product code to the range of 1-5 inclusive. unordered_map<int, int> map; int s; int totalOffers; vector<int> buy(vector<int>(6, 0)); int sentinel;