





import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_distilbert import DistilBertTokenizer


_lowerCamelCase			       =      logging.get_logger(__name__)

_lowerCamelCase			       =      {'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

_lowerCamelCase			       =      {
    'vocab_file': {
        'distilbert-base-uncased': 'https://huggingface.co/distilbert-base-uncased/resolve/main/vocab.txt',
        'distilbert-base-uncased-distilled-squad': (
            'https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/vocab.txt'
        ),
        'distilbert-base-cased': 'https://huggingface.co/distilbert-base-cased/resolve/main/vocab.txt',
        'distilbert-base-cased-distilled-squad': (
            'https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/vocab.txt'
        ),
        'distilbert-base-german-cased': 'https://huggingface.co/distilbert-base-german-cased/resolve/main/vocab.txt',
        'distilbert-base-multilingual-cased': (
            'https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'distilbert-base-uncased': 'https://huggingface.co/distilbert-base-uncased/resolve/main/tokenizer.json',
        'distilbert-base-uncased-distilled-squad': (
            'https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/tokenizer.json'
        ),
        'distilbert-base-cased': 'https://huggingface.co/distilbert-base-cased/resolve/main/tokenizer.json',
        'distilbert-base-cased-distilled-squad': (
            'https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/tokenizer.json'
        ),
        'distilbert-base-german-cased': (
            'https://huggingface.co/distilbert-base-german-cased/resolve/main/tokenizer.json'
        ),
        'distilbert-base-multilingual-cased': (
            'https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/tokenizer.json'
        ),
    },
}

_lowerCamelCase			       =      {
    'distilbert-base-uncased': 512,
    'distilbert-base-uncased-distilled-squad': 512,
    'distilbert-base-cased': 512,
    'distilbert-base-cased-distilled-squad': 512,
    'distilbert-base-german-cased': 512,
    'distilbert-base-multilingual-cased': 512,
}


_lowerCamelCase			       =      {
    'distilbert-base-uncased': {'do_lower_case': True},
    'distilbert-base-uncased-distilled-squad': {'do_lower_case': True},
    'distilbert-base-cased': {'do_lower_case': False},
    'distilbert-base-cased-distilled-squad': {'do_lower_case': False},
    'distilbert-base-german-cased': {'do_lower_case': False},
    'distilbert-base-multilingual-cased': {'do_lower_case': False},
}







class 			__A       (      lowerCamelCase__  ):




      """simple docstring"""







      UpperCAmelCase__						=      VOCAB_FILES_NAMES
      UpperCAmelCase__						=      PRETRAINED_VOCAB_FILES_MAP
      UpperCAmelCase__						=      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      UpperCAmelCase__						=      PRETRAINED_INIT_CONFIGURATION
      UpperCAmelCase__						=      ["""input_ids""", """attention_mask"""]
      UpperCAmelCase__						=      DistilBertTokenizer


      def __init__(		self      ,							a__=None      ,							a__=None      ,							a__=True      ,							a__="[UNK]"      ,							a__="[SEP]"      ,							a__="[PAD]"      ,							a__="[CLS]"      ,							a__="[MASK]"      ,							a__=True      ,							a__=None      ,							**a__      ,							):



             """simple docstring"""





             super().__init__(
                 a__      ,							tokenizer_file=a__      ,							do_lower_case=a__      ,							unk_token=a__      ,							sep_token=a__      ,							pad_token=a__      ,							cls_token=a__      ,							mask_token=a__      ,							tokenize_chinese_chars=a__      ,							strip_accents=a__      ,							**a__      ,							)

             _lowerCamelCase							:     List[str]	=		json.loads(self.backend_tokenizer.normalizer.__getstate__())
             if (
                 normalizer_state.get('''lowercase'''      ,							a__) != do_lower_case
                 or normalizer_state.get('''strip_accents'''      ,							a__) != strip_accents
                 or normalizer_state.get('''handle_chinese_chars'''      ,							a__) != tokenize_chinese_chars
             ):
                    _lowerCamelCase							:     int	=		getattr(a__      ,							normalizer_state.pop('''type'''))
                    _lowerCamelCase							:     List[Any]	=		do_lower_case
                    _lowerCamelCase							:     str	=		strip_accents
                    _lowerCamelCase							:     str	=		tokenize_chinese_chars
                    _lowerCamelCase							:     Tuple	=		normalizer_class(**a__)

             _lowerCamelCase							:     int	=		do_lower_case


      def 				__snake_case			(		self      ,							a__      ,							a__=None):



             """simple docstring"""





             _lowerCamelCase							:     Union[str, Any]	=		[self.cls_token_id] + token_ids_a + [self.sep_token_id]

             if token_ids_a:
                    output += token_ids_a + [self.sep_token_id]

             return output


      def 				__snake_case			(		self      ,							a__      ,							a__ = None):



             """simple docstring"""





             _lowerCamelCase							:     Tuple	=		[self.sep_token_id]
             _lowerCamelCase							:     Dict	=		[self.cls_token_id]
             if token_ids_a is None:
                    return len(cls + token_ids_a + sep) * [0]
             return len(cls + token_ids_a + sep) * [0] + len(token_ids_a + sep) * [1]



      def 				__snake_case			(		self      ,							a__      ,							a__ = None):



             """simple docstring"""





             _lowerCamelCase							:     Optional[Any]	=		self._tokenizer.model.save(a__      ,							name=a__)
             return tuple(a__)








import math




def    __UpperCAmelCase(      lowercase_ ,    lowercase_      ):
       _lowerCamelCase							:     List[str]	=		len(lowercase_      )
       _lowerCamelCase							:     Optional[int]	=		int(math.floor(math.sqrt(lowercase_      )      )      )
       _lowerCamelCase							:     Tuple	=		0
       while arr[min(lowercase_ ,    lowercase_      ) - 1] < x:
              _lowerCamelCase							:     Optional[Any]	=		step
              step += int(math.floor(math.sqrt(lowercase_      )      )      )
              if prev >= n:
                     return -1

       while arr[prev] < x:
              _lowerCamelCase							:     int	=		prev + 1
              if prev == min(lowercase_ ,    lowercase_      ):
                     return -1
       if arr[prev] == x:
              return prev
       return -1


if __name__ == "__main__":
       _lowerCamelCase			       =      input('Enter numbers separated by a comma:\n').strip()
       _lowerCamelCase			       =      [int(item) for item in user_input.split(',')]
       _lowerCamelCase			       =      int(input('Enter the number to be searched:\n'))
       _lowerCamelCase			       =      jump_search(arr, x)
       if res == -1:
              print('Number not found!')
       else:
              print(F'''Number {x} is at index {res}''')

