





def 				__UpperCamelCase  (		snake_case     )  ->						tuple[int, int]:


   '''simple docstring'''







   if len(snake_case     ) == 1:
      return a[0], a[0]
   else:
      # split A into half.
      __A				 =       a[: len(snake_case     ) // 2]
      __A				 =       a[len(snake_case     ) // 2 :]

      # 2 sub problems, 1/2 of original size.
      __A ,						__A				 =       max_difference(snake_case     )
      __A ,						__A				 =       max_difference(snake_case     )

      # get min of first and max of second
      # linear time
      __A				 =       min(snake_case     )
      __A				 =       max(snake_case     )

      # 3 cases, either (small1, big1),
      # (min_first, max_second), (small2, big2)
      # constant comparisons
      if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
         return smalla, biga
      elif biga - smalla > max_second - min_first:
         return smalla, biga
      else:
         return min_first, max_second


if __name__ == "__main__":
    import doctest

    doctest.testmod()








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


_UpperCamelCase   :							Dict     =	logging.get_logger(__name__)

_UpperCamelCase   :							Optional[int]     =	{
    """MCG-NJU/videomae-base""": """https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json""",
}







class 						_lowerCAmelCase(						_a):

  """simple docstring"""







  lowerCamelCase__      					=   '''videomae'''

  def __init__( self  ,    UpperCAmelCase=2_24  ,    UpperCAmelCase=16  ,    UpperCAmelCase=3  ,    UpperCAmelCase=16  ,    UpperCAmelCase=2  ,    UpperCAmelCase=7_68  ,    UpperCAmelCase=12  ,    UpperCAmelCase=12  ,    UpperCAmelCase=30_72  ,    UpperCAmelCase="gelu"  ,    UpperCAmelCase=0.0  ,    UpperCAmelCase=0.0  ,    UpperCAmelCase=0.02  ,    UpperCAmelCase=1e-12  ,    UpperCAmelCase=True  ,    UpperCAmelCase=True  ,    UpperCAmelCase=6  ,    UpperCAmelCase=3_84  ,    UpperCAmelCase=4  ,    UpperCAmelCase=15_36  ,    UpperCAmelCase=True  ,    **UpperCAmelCase  ,    )-> Any:
     super().__init__(**UpperCAmelCase     )

     __A				 =       image_size
     __A				 =       patch_size
     __A				 =       num_channels
     __A				 =       num_frames
     __A				 =       tubelet_size

     __A				 =       hidden_size
     __A				 =       num_hidden_layers
     __A				 =       num_attention_heads
     __A				 =       intermediate_size
     __A				 =       hidden_act
     __A				 =       hidden_dropout_prob
     __A				 =       attention_probs_dropout_prob
     __A				 =       initializer_range
     __A				 =       layer_norm_eps
     __A				 =       qkv_bias
     __A				 =       use_mean_pooling

     __A				 =       decoder_num_attention_heads
     __A				 =       decoder_hidden_size
     __A				 =       decoder_num_hidden_layers
     __A				 =       decoder_intermediate_size
     __A				 =       norm_pix_loss

