結果
問題 |
No.2008 Super Worker
|
ユーザー |
![]() |
提出日時 | 2021-08-21 16:38:26 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 292 ms |
コンパイル使用メモリ | 82,456 KB |
実行使用メモリ | 88,160 KB |
最終ジャッジ日時 | 2024-07-06 05:53:35 |
合計ジャッジ時間 | 7,540 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 TLE * 2 -- * 22 |
ソースコード
from itertools import permutations N = int(input()) A = [int(a) for a in input().split()] B = [int(a) for a in input().split()] ans = 0 for a in permutations([i for i in range(N)]): s = 0 l = 1 for i in a: s += l * A[i] l *= B[i] ans = max(ans, s) print(ans % (10 ** 9 + 7))