您好,欢迎访问一九零五行业门户网

Codefores Round #263 (div2) B. Appleman and Card Game

appleman has n cards. each card has an uppercase letter written on it. toastman must choose k cards from appleman's cards. then appleman should give toastman some coins depending on the chosen cards. formally, for each toastman's card i yo
appleman has n cards. each card has an uppercase letter written on it. toastman must choose k cards from appleman's cards. then appleman should give toastman some coins depending on the chosen cards. formally, for each toastman's card i you should calculate how much toastman's cards have the letter equal to letter on ith, then sum up all these quantities, such a number of coins appleman should give to toastman.
given the description of appleman's cards. what is the maximum number of coins toastman can get?
其它类似信息

推荐信息