from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase__  	=      logging.get_logger(__name__)

lowerCAmelCase__  	=      {
    "google/reformer-crime-and-punishment": (
        "https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/config.json"
    ),
    "google/reformer-enwik8": "https://huggingface.co/google/reformer-enwik8/resolve/main/config.json",
}
class 	_a  (							lowerCamelCase_					):



	"""simple docstring"""



	__SCREAMING_SNAKE_CASE              =					'reformer'
	__SCREAMING_SNAKE_CASE              =					['past_buckets_states']
	__SCREAMING_SNAKE_CASE              =					{}


	def __init__(   self       ,  lowerCAmelCase_=64       ,  lowerCAmelCase_=["local", "lsh", "local", "lsh", "local", "lsh"]       ,  lowerCAmelCase_=1.0       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_=[64, 64]       ,  lowerCAmelCase_=[64, 192]       ,  lowerCAmelCase_=0       ,  lowerCAmelCase_=2       ,  lowerCAmelCase_=512       ,  lowerCAmelCase_=None       ,  lowerCAmelCase_="relu"       ,  lowerCAmelCase_=0.0_5       ,  lowerCAmelCase_=256       ,  lowerCAmelCase_=0.0_2       ,  lowerCAmelCase_=False       ,  lowerCAmelCase_=1e-12       ,  lowerCAmelCase_=1       ,  lowerCAmelCase_=0       ,  lowerCAmelCase_=0.0_5       ,  lowerCAmelCase_=64       ,  lowerCAmelCase_=64       ,  lowerCAmelCase_=0.0       ,  lowerCAmelCase_=1       ,  lowerCAmelCase_=0       ,  lowerCAmelCase_=4096       ,  lowerCAmelCase_=12       ,  lowerCAmelCase_=None       ,  lowerCAmelCase_=1       ,  lowerCAmelCase_=0       ,  lowerCAmelCase_=320       ,  lowerCAmelCase_=False       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_=None       ,  **lowerCAmelCase_       ,  ):
		_lowercase   =hash_seed
		_lowercase   =vocab_size
		_lowercase   =attention_head_size
		_lowercase   =hidden_size
		_lowercase   =num_attention_heads
		_lowercase   =num_hashes
		_lowercase   =len(lowerCAmelCase_       )
		_lowercase   =tuple(lowerCAmelCase_       ) if isinstance(lowerCAmelCase_       ,  lowerCAmelCase_       ) else num_buckets
		_lowercase   =lsh_attn_chunk_length
		_lowercase   =local_attn_chunk_length
		_lowercase   =lsh_num_chunks_after
		_lowercase   =lsh_num_chunks_before
		_lowercase   =local_num_chunks_after
		_lowercase   =local_num_chunks_before
		_lowercase   =hidden_act
		_lowercase   =feed_forward_size
		_lowercase   =hidden_dropout_prob
		_lowercase   =lsh_attention_probs_dropout_prob
		_lowercase   =local_attention_probs_dropout_prob
		_lowercase   =max_position_embeddings
		_lowercase   =initializer_range
		_lowercase   =layer_norm_eps
		_lowercase   =axial_pos_embds
		_lowercase   =tuple(lowerCAmelCase_       )
		_lowercase   =tuple(lowerCAmelCase_       )
		_lowercase   =axial_norm_std
		_lowercase   =chunk_size_lm_head
		_lowercase   =attn_layers
		_lowercase   =use_cache
		_lowercase   =classifier_dropout
		super().__init__(
		    pad_token_id=lowerCAmelCase_       ,  eos_token_id=lowerCAmelCase_       ,  is_decoder=lowerCAmelCase_       ,  tie_word_embeddings=lowerCAmelCase_       ,  **lowerCAmelCase_       ,  )





'''simple docstring'''


from itertools import combinations, product


def    _lowerCamelCase       ( lowerCamelCase_   :				int      ,	lowerCamelCase_   :				int      ,	lowerCamelCase_   :				int      ,	lowerCamelCase_   :				int  ):



     """simple docstring"""





     if xa == ya == 0 or xa == ya == 0:
          return False
     UpperCAmelCase_				:  Union[str, Any]  = xa * xa + ya * ya
     UpperCAmelCase_				:  str  = xa * xa + ya * ya
     UpperCAmelCase_				:  str  = (xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
     return (
         a_square + b_square == c_square
         or a_square + c_square == b_square
         or b_square + c_square == a_square
     )


def    _lowerCamelCase       ( lowerCamelCase_   :				int = 50  ):



     """simple docstring"""





     return sum(
         1
         for pta, pta in combinations(product(range(limit + 1  )      ,	repeat=2  )      ,	2  )
         if is_right(*lowerCamelCase_      ,	*lowerCamelCase_  )  )


if __name__ == "__main__":
 print(f'''{solution() = }''')






