結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-15 11:02:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 412 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 19,072 KB |
| 最終ジャッジ日時 | 2024-09-20 01:33:44 |
| 合計ジャッジ時間 | 4,906 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 TLE * 1 -- * 4 |
ソースコード
from itertools import permutations
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
L = []
for b in permutations(B):
TOTAL = 0
for i, j in zip(A, b):
TOTAL += max(i-j, 0)
L += [TOTAL]
MAX = max(L)
ANS = 0
for b in permutations(B):
TOTAL = 0
for i, j in zip(A, b):
TOTAL += max(i-j, 0)
if TOTAL == MAX:
ANS += 1
print(ANS)