結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
liny_tail
|
| 提出日時 | 2020-09-18 09:51:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 2,000 ms |
| コード長 | 379 bytes |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-22 07:39:59 |
| 合計ジャッジ時間 | 1,251 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
N = int(input().strip())
dic = {}
for i in range(N):
No = int(input().strip())
M, S = map(int, input().strip().split())
Tag = input().strip().split()
for j in Tag:
try:
dic[j] += S
except:
dic[j] = S
dic = sorted(dic.items(), key = lambda x:x[0])
for i in sorted(dic, key = lambda x:x[1], reverse=True)[:10]:
print('{} {}'.format(i[0], i[1]))
liny_tail