結果
問題 |
No.2008 Super Worker
|
ユーザー |
![]() |
提出日時 | 2022-07-15 21:27:57 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,058 bytes |
コンパイル時間 | 581 ms |
コンパイル使用メモリ | 81,664 KB |
実行使用メモリ | 134,288 KB |
最終ジャッジ日時 | 2024-06-27 16:52:41 |
合計ジャッジ時間 | 5,792 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 19 TLE * 1 -- * 12 |
ソースコード
# ライブラリさんたち from collections import deque, Counter, defaultdict from operator import itemgetter from bisect import bisect_right, bisect_left from itertools import combinations, permutations, accumulate, product import heapq # from numpy import base_repr from copy import deepcopy import sys # sys.setrecursionlimit(10**6) from math import gcd, log2, log10 # 便利な関数くん def my_lcm(a, b): return a * b // gcd(a, b) def my_ceil(N, W): return (-(-N//W)) def out(func): if func: print("Yes") else: print("No") def inint(): return int(input()) def inmap(): return map(int, input().split()) # 定数ちゃん # MOD = 998244353 MOD = 10 ** 9 + 7 # INF = 10 ** 18 + 1 def main(): N = inint() A = list(inmap()) B = list(inmap()) li = [] for i in range(N): li.append([A[i], B[i]]) li = sorted(li, key = itemgetter(0)) ans = 0 level = 1 for j in range(N): ans += level * li[i][0] % MOD level = level * li[i][1] return ans % MOD print(main())