結果
問題 |
No.2008 Super Worker
|
ユーザー |
![]() |
提出日時 | 2022-07-15 22:32:42 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 82,588 KB |
実行使用メモリ | 643,492 KB |
最終ジャッジ日時 | 2024-06-27 19:17:50 |
合計ジャッジ時間 | 5,356 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 MLE * 1 -- * 23 |
ソースコード
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 list(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)