結果

問題 No.628 Tagの勢い
ユーザー MaboyMaboy
提出日時 2018-02-22 09:42:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 443 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-16 20:08:28
合計ジャッジ時間 1,343 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 31 ms
10,624 KB
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 29 ms
10,496 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 29 ms
10,752 KB
testcase_11 AC 28 ms
10,624 KB
testcase_12 AC 37 ms
10,496 KB
testcase_13 WA -
testcase_14 AC 38 ms
10,624 KB
testcase_15 AC 38 ms
10,368 KB
testcase_16 AC 37 ms
10,624 KB
testcase_17 RE -
testcase_18 AC 30 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

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

t={k:v for k,v in sorted(t.items(), key=lambda x:x[1],reverse=True)}
v=sorted([x for x in set(t.values())],reverse=1)
c=0
while c<10:
  s=v.pop(0)
  d=((k,v) for k,v in sorted({k:v for k,v in t.items() if v==s}.items()))
  for i,j in d:
    print(i,j)
    c+=1
0