結果
問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
ユーザー |
![]() |
提出日時 | 2017-01-26 18:32:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 586 bytes |
コンパイル時間 | 257 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 12,800 KB |
最終ジャッジ日時 | 2024-12-23 11:43:44 |
合計ジャッジ時間 | 3,670 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
n = int(input()) l = list(map(int,input().split(' '))) t = int(input()) s = {} cnt = [0 for i in range(n)] for i in range(t): name,p = input().split(' ') num = ord(p) - ord('A') cnt[num] += 1 if not name in s: s[name] = [0 for j in range(n+2)] score = 50 * l[num] + 250 * l[num] // (4 + cnt[num]) s[name][num] = score s[name][n] += score s[name][n+1] = i ns = sorted(s.items(),key = lambda x: (-x[1][n],x[1][n+1])) for i in range(len(ns)): print(i+1,ns[i][0],end=' ') for j in range(n+1): print(ns[i][1][j],end=' ') print("")