




from statistics import mean, stdev





def 						__A						(      __lowerCamelCase				,     __lowerCamelCase = 3       ) ->			list:
	a									=				min(__lowerCamelCase       )
	a									=				max(__lowerCamelCase       )
	# normalize data
	return [round((x - x_min) / (x_max - x_min)				,     __lowerCamelCase       ) for x in data]





def 						__A						(      __lowerCamelCase				,     __lowerCamelCase = 3       ) ->			list:
	a									=				mean(__lowerCamelCase       )
	a									=				stdev(__lowerCamelCase       )
	# standardize data
	return [round((x - mu) / (sigma)				,     __lowerCamelCase       ) for x in data]







from bisect import bisect
from itertools import accumulate





def 						__A						(      __lowerCamelCase				,     __lowerCamelCase				,     __lowerCamelCase				,     __lowerCamelCase       ) ->			Dict:
	a									=				sorted(zip(__lowerCamelCase				,     __lowerCamelCase       )				,     key=lambda __lowerCamelCase       : x[0] / x[1]				,     reverse=__lowerCamelCase       )
	a							,					a									=				[i[0] for i in r], [i[1] for i in r]
	a									=				list(accumulate(__lowerCamelCase       )       )
	a									=				bisect(__lowerCamelCase				,     __lowerCamelCase       )
	return (
	    0
	    if k == 0
	    else sum(vl[:k]       ) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
	    if k != n
	    else sum(vl[:k]       )
	)


if __name__ == "__main__":
		import doctest

		doctest.testmod()

