------
## 最终结论
```python
def wordBreak(s: str, wordDict: list) -> bool:
    dp = [False] * (len(s) + 1)
    dp[0] = True
    
    for i in range(1, len(s) + 1):
        for j in range(i):
            if s[j:i] in wordDict and dp[j]:
                dp[i] = True
                break
                
    return dp[len(s)]

# Example usage:
s1 = "leetcode"
wordDict1 = ["leet", "code"]
print(wordBreak(s1, wordDict1))  # Output: True

s2 = "applepenapple"
wordDict2 = ["apple", "pen"]
print(wordBreak(s2, wordDict2))  # Output: True

s3 = "catsandog"
wordDict3 = ["cats", "dog", "sand", "and", "cat"]
print(wordBreak(s3, wordDict3))  # Output: False
```