結果
問題 | No.1279 Array Battle |
ユーザー |
![]() |
提出日時 | 2020-11-06 21:22:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 555 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 82,648 KB |
実行使用メモリ | 76,248 KB |
最終ジャッジ日時 | 2024-07-22 12:00:18 |
合計ジャッジ時間 | 1,897 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 10 |
ソースコード
mod = 1000000007 eps = 10**-9 def main(): import sys from itertools import permutations input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) ma = 0 cnt = 0 for P in permutations(A): tmp = 0 for i, a in enumerate(P): if a > B[i]: tmp += a - B[i] if tmp == ma: cnt += 1 elif tmp > cnt: ma = tmp cnt = 1 print(cnt) if __name__ == '__main__': main()