結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-05 21:27:43 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 102 ms / 2,000 ms |
| コード長 | 356 bytes |
| コンパイル時間 | 729 ms |
| コンパイル使用メモリ | 77,304 KB |
| 実行使用メモリ | 79,488 KB |
| 最終ジャッジ日時 | 2024-10-07 22:03:32 |
| 合計ジャッジ時間 | 3,051 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
N = int(raw_input())
D = {}
for i in xrange(N):
raw_input()
M, S = map(int, raw_input().split())
SS = raw_input().split()
for s in SS:
if s in D:
D[s] += S
else:
D[s] = S
cnt = 0
for k, v in sorted(D.items(), key=lambda x: (-x[1], x[0])):
print k, v
cnt += 1
if cnt >= 10:
break