





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


__A							   =							logging.get_logger(__name__)

__A							   =							{
    "weiweishi/roc-bert-base-zh": "https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json",
}



class   _SCREAMING_SNAKE_CASE		(      __SCREAMING_SNAKE_CASE       ):







 '''simple docstring'''
 lowercase_						=     "roc_bert"

 def __init__(self							:  Dict			,					UpperCAmelCase_							:  Optional[int]=30_522			,					UpperCAmelCase_							:  Any=768			,					UpperCAmelCase_							:  Any=12			,					UpperCAmelCase_							:  Optional[Any]=12			,					UpperCAmelCase_							:  Union[str, Any]=3_072			,					UpperCAmelCase_							:  List[Any]="gelu"			,					UpperCAmelCase_							:  str=0.1			,					UpperCAmelCase_							:  Dict=0.1			,					UpperCAmelCase_							:  str=512			,					UpperCAmelCase_							:  Any=2			,					UpperCAmelCase_							:  Optional[int]=0.02			,					UpperCAmelCase_							:  Tuple=1E-1_2			,					UpperCAmelCase_							:  Optional[Any]=True			,					UpperCAmelCase_							:  Any=0			,					UpperCAmelCase_							:  int="absolute"			,					UpperCAmelCase_							:  Union[str, Any]=None			,					UpperCAmelCase_							:  List[Any]=True			,					UpperCAmelCase_							:  List[Any]=True			,					UpperCAmelCase_							:  List[Any]=768			,					UpperCAmelCase_							:  int=910			,					UpperCAmelCase_							:  Union[str, Any]=512			,					UpperCAmelCase_							:  Any=24_858			,					UpperCAmelCase_							:  List[str]=True			,					**UpperCAmelCase_							:  str			,					)			->int:



   '''simple docstring'''



   lowerCamelCase__: List[Any]         =vocab_size
   lowerCamelCase__: Any         =max_position_embeddings
   lowerCamelCase__: str         =hidden_size
   lowerCamelCase__: int         =num_hidden_layers
   lowerCamelCase__: Optional[int]         =num_attention_heads
   lowerCamelCase__: Optional[Any]         =intermediate_size
   lowerCamelCase__: int         =hidden_act
   lowerCamelCase__: Optional[Any]         =hidden_dropout_prob
   lowerCamelCase__: Optional[Any]         =attention_probs_dropout_prob
   lowerCamelCase__: List[Any]         =initializer_range
   lowerCamelCase__: Tuple         =type_vocab_size
   lowerCamelCase__: Dict         =layer_norm_eps
   lowerCamelCase__: Tuple         =use_cache
   lowerCamelCase__: int         =enable_pronunciation
   lowerCamelCase__: str         =enable_shape
   lowerCamelCase__: List[Any]         =pronunciation_embed_dim
   lowerCamelCase__: int         =pronunciation_vocab_size
   lowerCamelCase__: Union[str, Any]         =shape_embed_dim
   lowerCamelCase__: Union[str, Any]         =shape_vocab_size
   lowerCamelCase__: int         =concat_input
   lowerCamelCase__: str         =position_embedding_type
   lowerCamelCase__: str         =classifier_dropout
   super().__init__(pad_token_id=UpperCAmelCase_			,					**UpperCAmelCase_)








def   __lowerCamelCase   (				__a  :int       )						->							Dict:






		"""simple docstring"""

		A__     =  len(__a       )
		A__     =  sum(__a       )

		A__     =  [[False for x in range(s + 1       )] for y in range(n + 1       )]

		for i in range(1       ,	n + 1       ):
				A__     =  True

		for i in range(1       ,	s + 1       ):
				A__     =  False

		for i in range(1       ,	n + 1       ):
				for j in range(1       ,	s + 1       ):
						A__     =  dp[i][j - 1]

						if arr[i - 1] <= j:
								A__     =  dp[i][j] or dp[i - 1][j - arr[i - 1]]

		for j in range(int(s / 2       )       ,	-1       ,	-1       ):
				if dp[n][j] is True:
						A__     =  s - 2 * j
						break

		return diff



