結果
問題 | No.447 ゆきこーだーの雨と雪 (2) |
ユーザー | maesora |
提出日時 | 2016-12-02 21:58:05 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 779 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 10,876 KB |
実行使用メモリ | 10,068 KB |
最終ジャッジ日時 | 2023-08-18 12:37:32 |
合計ジャッジ時間 | 2,458 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 17 ms
7,936 KB |
testcase_01 | AC | 16 ms
8,020 KB |
testcase_02 | AC | 16 ms
7,980 KB |
testcase_03 | AC | 24 ms
8,120 KB |
testcase_04 | AC | 24 ms
8,516 KB |
testcase_05 | AC | 39 ms
9,500 KB |
testcase_06 | AC | 44 ms
9,696 KB |
testcase_07 | AC | 32 ms
8,720 KB |
testcase_08 | AC | 33 ms
9,056 KB |
testcase_09 | AC | 44 ms
9,832 KB |
testcase_10 | AC | 20 ms
8,112 KB |
testcase_11 | AC | 25 ms
8,540 KB |
testcase_12 | AC | 26 ms
8,924 KB |
testcase_13 | AC | 41 ms
9,548 KB |
testcase_14 | AC | 45 ms
9,916 KB |
testcase_15 | AC | 28 ms
8,692 KB |
testcase_16 | AC | 21 ms
8,576 KB |
testcase_17 | AC | 26 ms
8,400 KB |
testcase_18 | AC | 19 ms
8,264 KB |
testcase_19 | AC | 48 ms
10,068 KB |
testcase_20 | AC | 46 ms
9,900 KB |
testcase_21 | AC | 26 ms
8,444 KB |
testcase_22 | AC | 27 ms
8,648 KB |
testcase_23 | AC | 31 ms
8,732 KB |
testcase_24 | AC | 45 ms
9,532 KB |
testcase_25 | AC | 50 ms
9,780 KB |
testcase_26 | AC | 35 ms
8,952 KB |
testcase_27 | AC | 35 ms
8,852 KB |
ソースコード
# coding: utf-8 import math N = int(input()) pLevels = tuple(map(int, input().split())) T = int(input()) pAccepted = [0] * N contestants = {} for i in range(T): s = input().strip().split() name = s[0] p = ord(s[1]) - ord("A") if name not in contestants: contestants[name] = [0] * (N + 1) pl = pLevels[p] score = 50 * pl + 50 * pl / (1 + 0.2 * pAccepted[p]) contestants[name][p] = math.floor(score) pAccepted[p] += 1 contestants[name][N] = i i = 1 for name, scores in sorted(contestants.items(), key=lambda x: (-sum(x[1][:-1]), x[1][-1])): print("{} {name} {scores} {sum}".format( i, name=name, scores=" ".join([str(s) for s in scores[:-1]]), sum=sum(scores[:-1]))) i += 1