Chenglei Si·Dec 5, 2018Min Sum (DP)Given a sequence of n digits, you need to put m plus signs among them os that the sum of the expression is the minimum.
Chenglei Si·Nov 28, 2018POJ2796 Feel GoodProblem description: You are a given a sequence of non-negative numbers and you need to find a subsequence which the product of the sum of…
Chenglei Si·Nov 22, 2018POJ1661 JumpGameProblem: you are given a set of boards with their different heights and left and right ends. Jimmy is at some initial position above all…
Chenglei Si·Oct 22, 2018POJ1458 LCSThis is the classic longest common subsequence problem. Consider the ith character in string x and the jth character in string y. And we…
Chenglei Si·Oct 22, 2018POJ3494 Max SubmatrixThe input is an m*n matrix whose elements are either 0 or 1. The task is to find the number of elements of the largest submatrix of all…
Chenglei Si·Oct 8, 2018POJ2559 HistogramThe question gives a sequence of blocks with the same width 1 and different heights. You are to find the largest possible rectangles that…
Chenglei Si·Oct 2, 2018StackStack is a data structure that supports last in first out (LIFO). The implementation is very straightforward and I have attached a simple…
Chenglei Si·Sep 18, 2018Dynamic Programming 1We will explain the basic ideas of dynamic programming (DP) through a classic example: max sum triangle (POJ1163).
Chenglei Si·Sep 14, 2018Backpropagation Through TimeThis post shows the step-by-step derivation of backpropagation through time and implementation codes.
Chenglei Si·Sep 13, 2018POJ2663 Tri TilingYou are to fill a 3*n rectangle with 1*2 rectangles. With input n, you need to output the number of ways to fill the big rectangle.A response icon2A response icon2