結果
| 問題 |
No.1279 Array Battle
|
| コンテスト | |
| ユーザー |
ayaoni
|
| 提出日時 | 2020-11-06 23:25:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 352 ms / 2,000 ms |
| コード長 | 344 bytes |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 82,688 KB |
| 実行使用メモリ | 143,132 KB |
| 最終ジャッジ日時 | 2024-07-22 13:45:31 |
| 合計ジャッジ時間 | 3,469 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
import sys
from itertools import permutations
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N = I()
A,B = LI(),LI()
ANS = []
for X in list(permutations([i for i in range(N)],N)):
ANS.append(sum(max(0,A[X[i]]-B[i]) for i in range(N)))
print(ANS.count(max(ANS)))
ayaoni