



"""simple docstring"""






from collections import namedtuple

lowerCAmelCase__      =    namedtuple('''from_to''', '''from_ to''')

lowerCAmelCase__      =    {
    '''cubicmeter''': from_to(1, 1),
    '''litre''': from_to(0.0_0_1, 1000),
    '''kilolitre''': from_to(1, 1),
    '''gallon''': from_to(0.0_0_4_5_4, 2_6_4.1_7_2),
    '''cubicyard''': from_to(0.7_6_4_5_5, 1.3_0_7_9_5),
    '''cubicfoot''': from_to(0.0_2_8, 3_5.3_1_4_7),
    '''cup''': from_to(0.0_0_0_2_3_6_5_8_8, 4_2_2_6.7_5),
}






def 	snake_case_  (				A_ :		float,    A_ :		str,    A_ :		str						):


       '''simple docstring'''





       if from_type not in METRIC_CONVERSION:
              raise ValueError(
                  F'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
                  + ''', '''.join(A_						)						)
       if to_type not in METRIC_CONVERSION:
              raise ValueError(
                  F'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
                  + ''', '''.join(A_						)						)
       return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
   import doctest

   doctest.testmod()







"""simple docstring"""






from __future__ import annotations

from itertools import permutations
from random import randint
from timeit import repeat






def 	snake_case_  (				):


       '''simple docstring'''





       _lowerCamelCase						:    Optional[Any]         =			[randint(-10_00,    10_00						) for i in range(10						)]
       _lowerCamelCase						:    Tuple         =			randint(-50_00,    50_00						)
       return (arr, r)


lowerCAmelCase__      =    make_dataset()






def 	snake_case_  (				A_ :		list[int],    A_ :		int						):


       '''simple docstring'''





       for triplet in permutations(A_,    3						):
              if sum(A_						) == target:
                     return tuple(sorted(A_						)						)
       return (0, 0, 0)






def 	snake_case_  (				A_ :		list[int],    A_ :		int						):


       '''simple docstring'''





       arr.sort()
       _lowerCamelCase						:    Optional[Any]         =			len(A_						)
       for i in range(n - 1						):
              _lowerCamelCase      ,   _lowerCamelCase						:    int         =			i + 1, n - 1
              while left < right:
                     if arr[i] + arr[left] + arr[right] == target:
                            return (arr[i], arr[left], arr[right])
                     elif arr[i] + arr[left] + arr[right] < target:
                            left += 1
                     elif arr[i] + arr[left] + arr[right] > target:
                            right -= 1
       return (0, 0, 0)






def 	snake_case_  (				):


       '''simple docstring'''





       _lowerCamelCase						:    Tuple         =			'''
from __main__ import dataset, triplet_sum1, triplet_sum2
'''
       _lowerCamelCase						:    List[Any]         =			'''
triplet_sum1(*dataset)
'''
       _lowerCamelCase						:    str         =			'''
triplet_sum2(*dataset)
'''
       _lowerCamelCase						:    Optional[int]         =			repeat(setup=A_,    stmt=A_,    repeat=5,    number=1_00_00						)
       _lowerCamelCase						:    Union[str, Any]         =			repeat(setup=A_,    stmt=A_,    repeat=5,    number=1_00_00						)
       return (min(A_						), min(A_						))


if __name__ == "__main__":
   from doctest import testmod

   testmod()
   lowerCAmelCase__      =    solution_times()
   print(F"""The time for naive implementation is {times[0]}.""")
   print(F"""The time for optimized implementation is {times[1]}.""")


