

"""simple docstring"""



from collections.abc import Sequence





def  _snake_case     (    UpperCAmelCase_  :					Sequence[int] | None = None			):
     if nums is None or not nums:
          raise ValueError("""Input sequence should not be empty"""			)

     A__										=  nums[0]
     for i in range(1					,   len(UpperCAmelCase_			)			):
          A__										=  nums[i]
          A__										=  max(UpperCAmelCase_					,   ans + num					,   UpperCAmelCase_			)

     return ans


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 # Try on a sample input from the user
 SCREAMING_SNAKE_CASE_					:	Union[str, Any]							  =						int(input('Enter number of elements : ').strip())
 SCREAMING_SNAKE_CASE_					:	Optional[Any]							  =						list(map(int, input('\nEnter the numbers : ').strip().split()))[:n]
 print(max_subsequence_sum(array))









"""simple docstring"""



# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


SCREAMING_SNAKE_CASE_					:	List[str]							  =						{'configuration_mra': ['MRA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MraConfig']}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 SCREAMING_SNAKE_CASE_					:	List[Any]							  =						[
     'MRA_PRETRAINED_MODEL_ARCHIVE_LIST',
     'MraForMaskedLM',
     'MraForMultipleChoice',
     'MraForQuestionAnswering',
     'MraForSequenceClassification',
     'MraForTokenClassification',
     'MraLayer',
     'MraModel',
     'MraPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_mra import MRA_PRETRAINED_CONFIG_ARCHIVE_MAP, MraConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_mra import (
      MRA_PRETRAINED_MODEL_ARCHIVE_LIST,
      MraForMaskedLM,
      MraForMultipleChoice,
      MraForQuestionAnswering,
      MraForSequenceClassification,
      MraForTokenClassification,
      MraLayer,
      MraModel,
      MraPreTrainedModel,
  )
else:
 import sys

 SCREAMING_SNAKE_CASE_					:	List[str]							  =						_LazyModule(__name__, globals()['__file__'], _import_structure)






