




def 		a_							( __lowerCAmelCase   , __lowerCAmelCase				):
  lowerCAmelCase__										=      len(__lowerCAmelCase				)
  lowerCAmelCase__										=      []
  for i in range(len(__lowerCAmelCase				) - pat_len + 1				):
    lowerCAmelCase__										=      True
    for j in range(__lowerCAmelCase				):
      if s[i + j] != pattern[j]:
        lowerCAmelCase__										=      False
        break
    if match_found:
      position.append(__lowerCAmelCase				)
  return position


if __name__ == "__main__":
      assert naive_pattern_search("""ABCDEFG""", """DE""") == [3]
      print(naive_pattern_search("""ABAAABCDBBABCDDEBCABC""", """ABC"""))







from __future__ import annotations
def 		a_							( __lowerCAmelCase				):
  if not nums:
    return 0
  lowerCAmelCase__										=      nums[0]
  lowerCAmelCase__										=      0
  for num in nums[1:]:
    lowerCAmelCase__				,      lowerCAmelCase__										=      (
        max_excluding + num,
        max(__lowerCAmelCase   , __lowerCAmelCase				),
    )
  return max(__lowerCAmelCase   , __lowerCAmelCase				)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

