# 杰拉斯的博客

## [ACM_POJ_1579]动态规划入门练习（二）Function Run Fun

### Function Run Fun

Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 12362 Accepted: 6466

#### Description

We all love recursion! Don't we?

Consider a three-parameter recursive function w(a, b, c):

if a <= 0 or b <= 0 or c <= 0, then w(a, b, c) returns: 1 if a > 20 or b > 20 or c > 20, then w(a, b, c) returns:
w(20, 20, 20)

if a < b and b < c, then w(a, b, c) returns:
w(a, b, c-1) + w(a, b-1, c-1) - w(a, b-1, c)

otherwise it returns:
w(a-1, b, c) + w(a-1, b-1, c) + w(a-1, b, c-1) - w(a-1, b-1, c-1)

This is an easy function to implement. The problem is, if implemented directly, for moderate values of a, b and c (for example, a = 15, b = 15, c = 15), the program takes hours to run because of the massive recursion.

(阅读全文…)

## [ACM_POJ_1163]动态规划入门练习（一）The Triangle

### The Triangle

Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 28092 Accepted: 16504

#### Description

```7
3 8
8 1 0
2 7 4 4
4 5 2 6 5
```

(Figure 1)
Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends somewhere on the base. Each step can go either diagonally down to the left or diagonally down to the right.

(阅读全文…)

## 畅之茗Java新浪微博客户端2.0.2

UI界面素材部分来源于网络，版权归原作者所有（没办法，美工不擅长）。

(阅读全文…)

## [ACM_HDU_1465]不容易系列之一（错排）

### 不容易系列之一

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 8025 Accepted Submission(s): 3328

(阅读全文…)

## [ACM_HDU_2045]LELE的RPG难题

### 不容易系列之(3)—— LELE的RPG难题

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 15209 Accepted Submission(s): 6025

(阅读全文…)