
'''simple docstring'''


class 	__lowercase				:

			def __init__(self			,   A      ):
								lowerCamelCase_					:      Optional[int]     =		len(A      )
								lowerCamelCase_					:      Dict     =		[0] * len_array

								if len_array > 0:
													lowerCamelCase_					:      Optional[int]     =		array[0]

								for i in range(1			,   A      ):
													lowerCamelCase_					:      Tuple     =		self.prefix_sum[i - 1] + array[i]

			def        UpperCAmelCase__ (self			,   A			,   A      ):
								if start == 0:
													return self.prefix_sum[end]

								return self.prefix_sum[end] - self.prefix_sum[start - 1]






			def        UpperCAmelCase__ (self			,   A      ):
								lowerCamelCase_					:      Dict     =		{0}
								for sum_item in self.prefix_sum:
													if sum_item - target_sum in sums:
																		return True

													sums.add(A      )

								return False


if __name__ == "__main__":
					import doctest

					doctest.testmod()




'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


__lowercase							:   int					=     {}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__lowercase							:   Any					=     ['''BartphoTokenizer''']

if TYPE_CHECKING:
					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_bartpho import BartphoTokenizer

else:
					import sys

					__lowercase							:   Union[str, Any]					=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


