题链: http://codeforces.com/problemset/problem/623/E 题解: FFT,DP 题意: 一个有向图,给出每条边的起点u,终点v,费用c,以及花费每种时间的概率P[e][j](表示走第e条边花费时间为j的概率) 现在需要从1号点走到n号点,如果不能在T个单位时间内到达,则达到后还要另外支付X的费用. 求出所需支付的最小期望费用. 先是一个暴力的DP方法: (考虑到每条边的耗时至少为1,可以把状态设为类似分层图的形式) 定义$F[i][t]$为$t$时刻在…