結果

問題 No.2008 Super Worker
ユーザー yas_yasyu
提出日時 2022-07-15 22:33:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 370 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,820 KB
最終ジャッジ日時 2024-06-27 19:20:11
合計ジャッジ時間 6,674 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 TLE * 1 -- * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
n = int(input())
salary = list(map(int,input().split()))
jobP = list(map(int,input().split()))
MOD = 10**9+7

ans = -1
for Perm in itertools.permutations(list(range(n))):
	#print(Perm)
	now_ans = 0
	jobPower = 1
	for i in range(n):
		now_ans += salary[Perm[i]]*jobPower
		jobPower *= jobP[Perm[i]]
	#print(now_ans)
	ans = max(ans,now_ans)
print(ans%MOD)
0