设了状态 dp[x][y][l][r][v]dp[x][y][l][r][v]dp[x][y][l][r][v] 表示在 (x,y)(x,y)(x,y) 点手上有 lll 张LLL公司的票,rrr 张ZZZ公司的票,已经花了 vvv 元的方案数,求状态方程