



'''simple docstring'''


from datetime import datetime

import matplotlib.pyplot as plt
import torch






def  UpperCAmelCase_       (		lowercase__       ):


     '''simple docstring'''







     for param in module.parameters():
          a_       		=False






def  UpperCAmelCase_       (		):


     '''simple docstring'''







     a_       		="cuda" if torch.cuda.is_available() else "cpu"
     if torch.backends.mps.is_available() and torch.backends.mps.is_built():
          a_       		="mps"
     if device == "mps":
          print(
              "WARNING: MPS currently doesn't seem to work, and messes up backpropagation without any visible torch"
              " errors. I recommend using CUDA on a colab notebook or CPU instead if you're facing inexplicable issues"
              " with generations."       )
     return device






def  UpperCAmelCase_       (		lowercase__       ):


     '''simple docstring'''







     a_       		=plt.imshow(lowercase__       )
     fig.axes.get_xaxis().set_visible(lowercase__       )
     fig.axes.get_yaxis().set_visible(lowercase__       )
     plt.show()






def  UpperCAmelCase_       (		):


     '''simple docstring'''







     a_       		=datetime.now()
     a_       		=current_time.strftime("%H:%M:%S"       )
     return timestamp







'''simple docstring'''


from collections.abc import Sequence






def  UpperCAmelCase_       (		lowercase__ = None       ):


     '''simple docstring'''







     if nums is None or not nums:
          raise ValueError("Input sequence should not be empty"       )

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

     return ans


if __name__ == "__main__":
  import doctest

  doctest.testmod()

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


