This is a C++ Program that Solves Blueberries Problem using Dynamic Programming technique. Problem Description Teresa wants to pick up the blueberries in such a way that she may not exceed the limit proposed. When picking the blueberries, she noticed that if she pick from the bush i, she couldn’t pick the blueberries at the … Read more

This is a C++ Program that Solves the Assignments Problem using Dynamic Programming technique. Problem Description Your task will be to calculate number of different assignments of n different topics to n students such that everybody gets exactly one topic he likes. First line of input contains number of students n. Each of the next … Read more

This is a C++ Program that Solves the Bytelandian Gold Coins Problem using Dynamic Programming technique. Problem Description Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have … Read more

This is a C++ Program that Solves Non Decreasing Digits Problem using Dynamic Programming technique. Problem Description A number is said to be made up of non-decreasing digits if all the digits to the left of any digit is less than or equal to that digit. For example, the four-digit number 1234 is composed of … Read more

This is a C++ Program that Solves Cut the Ribbon Problem using Dynamic Programming technique. Problem Description Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each ribbon piece should have length a, b or c. After the … Read more

This is a C++ Program that Solves T Primes Problem using Dynamic Programming technique. Problem Description We know that prime numbers are positive integers that have exactly two distinct positive divisors. Similarly, we’ll call a positive integer t Т-prime, if t has exactly three distinct positive divisors. You are given an array of n positive … Read more

This is a C++ Program that Solves Boredom Problem using Dynamic Programming technique. Problem Description Alex doesn’t like boredom. That’s why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it. Given a sequence a consisting of n integers. The player … Read more

This is a C++ Program that Solves Army Problem using Dynamic Programming technique. Problem Description The Berland Armed Forces System consists of n ranks that are numbered using natural numbers from 1 to n, where 1 is the lowest rank and n is the highest rank. One needs exactly d[i] years to rise from rank … Read more

This is a C++ Program that Solves Trigraphs Problem using Dynamic Programming technique. Problem Description A tri-graph is an acyclic graph of (N >= 2) rows and exactly 3 columns. Unlike regular graphs, the costs in a tri-graph are associated with the vertices rather than the edges. The problem is to find the shortest path … Read more

This is a C++ Program that Solves Mixtures Problem using Dynamic Programming technique. Problem Description Harry Potter has n mixtures in front of him, arranged in a row. Each mixture has one of 100 different colors (colors have numbers from 0 to 99). He wants to mix all these mixtures together. At each step, he … Read more

advertisement

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @
LinkedIn | Youtube | Instagram | Facebook | Twitter