ZOJ 3200 首先我写了个高斯消元,但是消出来了一些奇怪的东西,我就放弃了... 然后只好考虑dp:\(dp[i][j][k]\)表示走到了第i步,到了\((j,k)\)这个节点的概率. 那么答案就是边上节点在所有的步数走到的概率加起来第一次超过\(p%\)的地方. 然后转移的时候枚举现在要走到哪一个方向,走到\((j',k')\),就可以转移到\(dp[i+1][j'][k']\). 然后一共需要走的步数是看对于当前这一步所有的节点所能到达的概率是不是都是0(为了浮点误差,我们需要把=0改…