HDU 1493 - QQpet exploratory park
Problem : Start from source. each step has p[x] possibility to step forward x steps. Show the possibility to enter some specific position.
Solution : Denote f[i][j] to be the possibility to enter position j in i-th step. Then f[i][j]=sum(f[i-1][j-x]*p[x]). The possibility of position p is sum(f[i][p]) for all i, since each step we should move forward, thus f[i][j] is independent from any other f[i'][j].