aspen138

aspen138 : 【字典】2852. 统计字母频率
3 年前

s = input () cnt = 0 d = dict () for i in s : if i . isalpha () : cnt += 1 if i not in d : d [ i ]= 1 else : d [ i ]+= 1 d = sorted ( d . items (), key = lambda ...查看全文
aspen138 : 【排序】3530. 和你在一起
3 年前

数据太弱了,甚至不考虑前导零的情况也能过 # 不会有前导零吧 n = int ( input ()) a = list ( input () . split ()) a = sorted ( a , reverse = True ) print ( "" . join ( a )) 好像是 18研究生复试题目 ...查看全文
aspen138 : 【dp】3531. 定西 题解
3 年,3 月前

n , k = map ( int , input () . split ()) s = set () if k != 0 : a = list ( map ( int , input () . split ())) s = set ( a ) dp = [ 0 for i in range ( 200 )] if 1 not in s : dp [ 1 ] = 1 if 2 not in s : ...查看全文