結果

問題 No.628 Tagの勢い
ユーザー TakoKurageTakoKurage
提出日時 2020-03-01 16:23:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-04-21 22:17:48
合計ジャッジ時間 1,758 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,752 KB
testcase_01 AC 36 ms
10,624 KB
testcase_02 AC 35 ms
10,752 KB
testcase_03 AC 34 ms
10,752 KB
testcase_04 AC 34 ms
10,624 KB
testcase_05 AC 33 ms
10,752 KB
testcase_06 AC 32 ms
10,752 KB
testcase_07 AC 32 ms
10,752 KB
testcase_08 AC 34 ms
10,752 KB
testcase_09 AC 33 ms
10,752 KB
testcase_10 AC 33 ms
10,624 KB
testcase_11 AC 33 ms
10,624 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 44 ms
11,008 KB
testcase_16 AC 42 ms
10,880 KB
testcase_17 AC 33 ms
10,752 KB
testcase_18 AC 34 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

sc = iter(open(0).read().split())
ni = lambda: int(next(sc))
ns = lambda: next(sc)

C = Counter()

N = ni()
for _ in range(N):
    No = ni()
    M, S = ni(), ni()
    T = {ns(): S for _ in range(M)}
    C += T

A = sorted(C.items(), key=lambda x: x[0])
A.sort(key=lambda x: -x[1])

for k, v in A[:10]:
    print(k, v)
0