<doocs>0087.Scramble String_1.py
def isScramble( s1: str, s2: str) -> bool:
    n = len(s1)
    dp = [[[False] * (n + 1) for _ in range(n)] for _ in range(n)]
    for i in range(n):
        for j in range(n):
            dp[i][j][1] = s1[i] == s2[j]
    for l in range(2, n + 1):
        for i1 in range(n - l + 1):
            for i2 in range(n - l + 1):
                for i in range(1, l):
                    if dp[i1][i2][i] and dp[i1 + i][i2 + i][l - i]:
                        dp[i1][i2][l] = True
                        break
                    if dp[i1][i2 + l - i][i] and dp[i1 + i][i2][l - i]:
                        dp[i1][i2][l] = True
                        break
    return dp[0][0][n]
def sample_funcname ( var_0 : str , var_2 : str ) -> bool :
    var_5 = len ( var_0 )
    var_10 = [ [ [ False ] * ( var_5 + 1 ) for var_8 in range ( var_5 ) ] for var_8 in range ( var_5 ) ]
    for var_11 in range ( var_5 ) :
        for var_12 in range ( var_5 ) :
            var_10 [ var_11 ] [ var_12 ] [ 1 ] = var_0 [ var_11 ] == var_2 [ var_12 ]
    for var_14 in range ( 2 , var_5 + 1 ) :
        for var_15 in range ( var_5 - var_14 + 1 ) :
            for var_16 in range ( var_5 - var_14 + 1 ) :
                for var_11 in range ( 1 , var_14 ) :
                    if var_10 [ var_15 ] [ var_16 ] [ var_11 ] and var_10 [ var_15 + var_11 ] [ var_16 + var_11 ] [ var_14 - var_11 ] :
                        var_10 [ var_15 ] [ var_16 ] [ var_14 ] = True
                        break
                    if var_10 [ var_15 ] [ var_16 + var_14 - var_11 ] [ var_11 ] and var_10 [ var_15 + var_11 ] [ var_16 ] [ var_14 - var_11 ] :
                        var_10 [ var_15 ] [ var_16 ] [ var_14 ] = True
                        break
    return var_10 [ 0 ] [ 0 ] [ var_5 ]
