

'''simple docstring'''






def 						_A	(       A__ ):






 """simple docstring"""



 __lowercase				    =					0
 __lowercase				    =					len(A__ )

 for i in range(n - 1 ):
  for j in range(i + 1	,							A__ ):
   if arr[i] > arr[j]:
    num_inversions += 1

 return num_inversions


def 						_A	(       A__ ):






 """simple docstring"""



 if len(A__ ) <= 1:
  return arr, 0
 __lowercase				    =					len(A__ ) // 2
 __lowercase				    =					arr[0:mid]
 __lowercase				    =					arr[mid:]

 __lowercase    ,      __lowercase				    =					count_inversions_recursive(A__ )
 __lowercase    ,      __lowercase				    =					count_inversions_recursive(A__ )
 __lowercase    ,      __lowercase				    =					_count_cross_inversions(A__	,							A__ )

 __lowercase				    =					inversion_p + inversions_q + cross_inversions
 return c, num_inversions


def 						_A	(       A__	,							A__ ):






 """simple docstring"""



 __lowercase				    =					[]
 __lowercase				    =					__lowercase				    =					__lowercase				    =					0
 while i < len(A__ ) and j < len(A__ ):
  if p[i] > q[j]:
   # if P[1] > Q[j], then P[k] > Q[k] for all  i < k <= len(P)
   # These are all inversions. The claim emerges from the
   # property that P is sorted.
   num_inversion += len(A__ ) - i
   r.append(q[j] )
   j += 1
  else:
   r.append(p[i] )
   i += 1

 if i < len(A__ ):
  r.extend(p[i:] )
 else:
  r.extend(q[j:] )

 return r, num_inversion


def 						_A	(       ):






 """simple docstring"""



 __lowercase				    =					[10, 2, 1, 5, 5, 2, 11]

 # this arr has 8 inversions:
 # (10, 2), (10, 1), (10, 5), (10, 5), (10, 2), (2, 1), (5, 2), (5, 2)

 __lowercase				    =					count_inversions_bf(A__ )
 __lowercase    ,      __lowercase				    =					count_inversions_recursive(A__ )

 assert num_inversions_bf == num_inversions_recursive == 8

 print('''number of inversions = '''	,							A__ )

 # testing an array with zero inversion (a sorted arr_1)

 arr_a.sort()
 __lowercase				    =					count_inversions_bf(A__ )
 __lowercase    ,      __lowercase				    =					count_inversions_recursive(A__ )

 assert num_inversions_bf == num_inversions_recursive == 0
 print('''number of inversions = '''	,							A__ )

 # an empty list should also have zero inversions
 __lowercase				    =					[]
 __lowercase				    =					count_inversions_bf(A__ )
 __lowercase    ,      __lowercase				    =					count_inversions_recursive(A__ )

 assert num_inversions_bf == num_inversions_recursive == 0
 print('''number of inversions = '''	,							A__ )


if __name__ == "__main__":
 main()





"""simple docstring"""


import requests
from bsa import BeautifulSoup


def    _lowerCamelCase   (     lowerCamelCase__	:							str = "https://www.worldometers.info/coronavirus"  ):
 lowercase__       :       Optional[Any]				=						BeautifulSoup(requests.get(lowerCamelCase__  ).text       ,		"""html.parser"""  )
 lowercase__       :       Union[str, Any]				=						soup.findAll("""h1"""  )
 lowercase__       :       List[str]				=						soup.findAll("""div"""       ,		{"""class""": """maincounter-number"""}  )
 keys += soup.findAll("""span"""       ,		{"""class""": """panel-title"""}  )
 values += soup.findAll("""div"""       ,		{"""class""": """number-table-main"""}  )
 return {key.text.strip(): value.text.strip() for key, value in zip(lowerCamelCase__       ,		lowerCamelCase__  )}


if __name__ == "__main__":
   print('\033[1m' + 'COVID-19 Status of the World' + '\033[0m\n')
   for key, value in world_covidaa_stats().items():
      print(F"{key}\n{value}\n")