結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー tookunn_1213tookunn_1213
提出日時 2016-11-19 00:17:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,128 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2024-05-04 19:27:33
合計ジャッジ時間 14,597 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
16,384 KB
testcase_01 AC 26 ms
11,008 KB
testcase_02 AC 26 ms
11,264 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 TLE -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 TLE -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())
L = [int(i) for i in input().split()]
T = int(input())
D = [input().split() for i in range(T)]
users = set([D[i][0] for i in range(T)])
AC = [0 for i in range(N)]
scores = {u : [0 for i in range(N)] for u in users}
points = {u : 0 for u in users}
timing = {u : 0 for u in users}
for i in range(T):
	name = D[i][0]
	problem = ord(D[i][1]) - ord('A')
	AC[problem] += 1

	scores[name][problem] = math.floor(50 * L[problem] + 50 * L[problem] // (0.8 + 0.2 * AC[problem]))
	points[name] += scores[name][problem]
	timing[name] = i
users = list(users)
data = [ [users[i],scores[users[i]],points[users[i]],timing[users[i]]] for i in range(len(users))]
for i in range(len(users)):
	for j in range(i + 1,len(users)):
		if data[i][2] < data[j][2]:
			tmp = data[i]
			data[i] = data[j]
			data[j] = tmp
		if data[i][2] == data[j][2]:
			if data[i][3] > data[j][3]:
				tmp = data[i]
				data[i] = data[j]
				data[j] = tmp
for i in range(len(data)):
	s = str(i + 1)
	s += " "
	s += str(data[i][0])
	s += " "
	for j in range(len(data[i][1])):
		s += str(data[i][1][j])
		s += " "
	s += str(data[i][2])
	print(s)
0