def longestIncreasingSubsequence(arr):
    dp = [1] * len(arr)
    for i in range(1, len(arr)):
        for j in range(0, i):
            if arr[i] >= arr[j]:
                dp[i] = max(dp[i], dp[j] + 1)
    return max(dp)


arr = [10, 22, 9, 33, 21, 50, 41, 60]
print(longestIncreasingSubsequence(arr))

964c3604c1587930faa878a2e9186bb659affec8
<mask token>

def longestIncreasingSubsequence(arr):
    dp = [1] * len(arr)
    for i in range(1, len(arr)):
        for j in range(0, i):
            if arr[i] >= arr[j]:
                dp[i] = max(dp[i], dp[j] + 1)
    return max(dp)


<mask token>

def longestIncreasingSubsequence(arr):
    dp = [1] * len(arr)
    for i in range(1, len(arr)):
        for j in range(0, i):
            if arr[i] >= arr[j]:
                dp[i] = max(dp[i], dp[j] + 1)
    return max(dp)


<mask token>
print(longestIncreasingSubsequence(arr))

def longestIncreasingSubsequence(arr):
    dp = [1] * len(arr)
    for i in range(1, len(arr)):
        for j in range(0, i):
            if arr[i] >= arr[j]:
                dp[i] = max(dp[i], dp[j] + 1)
    return max(dp)


arr = [10, 22, 9, 33, 21, 50, 41, 60]
print(longestIncreasingSubsequence(arr))
