結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
clearbook
|
| 提出日時 | 2020-01-04 17:11:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-22 20:51:34 |
| 合計ジャッジ時間 | 1,489 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 15 |
ソースコード
N = int(input())
ans = dict()
for i in range(N):
num = int(input())
M, score = map(int, input().split())
word = list(map(str, input().split()))
for j in range(M):
if word[j] in ans:
ans[word[j]] += score
else:
ans[word[j]] = score
ans = sorted(ans.items(), reverse=False, key=lambda x:x[1])
for i in range(min(len(ans), 10)):
print(ans[-i-1][0], ans[-i-1][1])
clearbook