結果

問題 No.628 Tagの勢い
ユーザー Maboy
提出日時 2018-02-22 03:50:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-07 22:33:45
合計ジャッジ時間 1,591 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

t={}
n=int(input())
for i in range(n):
  no=input()
  m,s=map(int,input().split())
  l=input().split()
  for j in l:
    if j not in t:
      t.update({j:s})
    else:
      t[j]+=s

  l=sorted(t.items(), key=lambda x:x[1],reverse=True)
  t={}
  for i in '.'*10:
    if not l:break
    d=l.pop(0)
    t.update({d[0]:d[1]})

l=sorted(t.items(), key=lambda x:x[1],reverse=True)

while l:
  a,b=l.pop(0)
  print(a,b)
0