




'''simple docstring'''





class 			_snake_case		:




			def __init__( self    ,							a__							)    ->    None:

										'''simple docstring'''




										snake_case_      =				len(a__							)
										snake_case_      =				[0] * len_array

										if len_array > 0:
																	snake_case_      =				array[0]

										for i in range(1    ,							a__							):
																	snake_case_      =				self.prefix_sum[i - 1] + array[i]




			def        lowerCAmelCase__    ( self    ,							a__    ,							a__							)    ->    int:

										'''simple docstring'''




										if start == 0:
																	return self.prefix_sum[end]

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




			def        lowerCAmelCase__    ( self    ,							a__							)    ->    bool:

										'''simple docstring'''




										snake_case_      =				{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_tokenizers_available, is_torch_available


_SCREAMING_SNAKE_CASE							:       Optional[int]						=			{
    "configuration_canine": ["CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP", "CanineConfig"],
    "tokenization_canine": ["CanineTokenizer"],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE							:       Dict						=			[
		    "CANINE_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "CanineForMultipleChoice",
		    "CanineForQuestionAnswering",
		    "CanineForSequenceClassification",
		    "CanineForTokenClassification",
		    "CanineLayer",
		    "CanineModel",
		    "CaninePreTrainedModel",
		    "load_tf_weights_in_canine",
		]


if TYPE_CHECKING:
		from .configuration_canine import CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP, CanineConfig
		from .tokenization_canine import CanineTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_canine import (
				    CANINE_PRETRAINED_MODEL_ARCHIVE_LIST,
				    CanineForMultipleChoice,
				    CanineForQuestionAnswering,
				    CanineForSequenceClassification,
				    CanineForTokenClassification,
				    CanineLayer,
				    CanineModel,
				    CaninePreTrainedModel,
				    load_tf_weights_in_canine,
				)


else:
		import sys

		_SCREAMING_SNAKE_CASE							:       int						=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




