結果
問題 | No.2008 Super Worker |
ユーザー |
👑 |
提出日時 | 2022-07-15 21:24:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,200 ms / 2,000 ms |
コード長 | 454 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 138,340 KB |
最終ジャッジ日時 | 2024-06-27 16:47:19 |
合計ジャッジ時間 | 16,487 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
MOD = 10 ** 9 + 7class f:def __init__(self, a, b):self.a = aself.b = bdef __lt__(self, other):return (1 - self.b) * other.a < (1 - other.b) * self.an = int(input())A = list(map(int, input().split()))B = list(map(int, input().split()))ab = [f(a, b) for a, b in zip(A, B)]ab.sort()x = 1ans = 0for tmp in ab:a = tmp.ab = tmp.bans += a * xans %= MODx *= bx %= MODprint(ans)