結果
| 問題 |
No.1279 Array Battle
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-11-06 21:26:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 105 ms / 2,000 ms |
| コード長 | 317 bytes |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 82,444 KB |
| 実行使用メモリ | 75,716 KB |
| 最終ジャッジ日時 | 2024-07-22 12:07:02 |
| 合計ジャッジ時間 | 1,975 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from itertools import permutations
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
Max=-1
Count=0
for alpha in permutations(A):
X=0
for i in range(N):
X+=max(0,alpha[i]-B[i])
if X==Max:
Count+=1
elif X>Max:
Max=X
Count=1
print(Count)
Kazun