<doocs>0403.Frog Jump_1.py
def canCross( stones: List[int]) -> bool:
    n = len(stones)
    dp = [[False] * n for i in range(n)]
    dp[0][0] = True
    for i in range(1, n):
        for j in range(i):
            k = stones[i] - stones[j]
            if k > j + 1:
                continue
            dp[i][k] = dp[j][k - 1] or dp[j][k] or dp[j][k + 1]
            if i == n - 1 and dp[i][k]:
                return True
    return False
def sample_funcname ( var_0 : List [ int ] ) -> bool :
    var_5 = len ( var_0 )
    var_9 = [ [ False ] * var_5 for var_7 in range ( var_5 ) ]
    var_9 [ 0 ] [ 0 ] = True
    for var_7 in range ( 1 , var_5 ) :
        for var_13 in range ( var_7 ) :
            var_14 = var_0 [ var_7 ] - var_0 [ var_13 ]
            if var_14 > var_13 + 1 :
                continue
            var_9 [ var_7 ] [ var_14 ] = var_9 [ var_13 ] [ var_14 - 1 ] or var_9 [ var_13 ] [ var_14 ] or var_9 [ var_13 ] [ var_14 + 1 ]
            if var_7 == var_5 - 1 and var_9 [ var_7 ] [ var_14 ] :
                return True
    return False
