結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-05-10 20:23:56 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 21,412 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-12 08:58:35 |
| 合計ジャッジ時間 | 3,602 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 11 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
import collections
D=collections.defaultdict(int)
for _ in range(n):
ni=int(input())
m,s=map(int,input().split())
T=[str(i) for i in input().split()]
for t in T:
D[t]+=s
Ans=sorted([(t,D[t]) for t in D.keys()],reverse=True,key=lambda x:x[1])
if len(Ans)>10:
Ans=Ans[:10]
for a in Ans:
print(*a)
takakin