結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
Bioinfo_K
|
| 提出日時 | 2018-01-05 21:45:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 536 bytes |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-10-07 22:08:23 |
| 合計ジャッジ時間 | 1,570 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import sys,collections
from operator import itemgetter
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()
n = I()
d = collections.defaultdict(int)
for i in range(n):
no = I()
m,s = Is()
tags = Ss()
for tag in tags:
d[tag] += s
ans = sorted(d.items(),key=itemgetter(0))
ans = sorted(ans,key=itemgetter(1),reverse=True)[:10]
for e in ans:
print(e[0],e[1])
Bioinfo_K