結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
nehan_der_thal
|
| 提出日時 | 2020-11-06 22:22:08 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 2,000 ms |
| コード長 | 368 bytes |
| 記録 | |
| コンパイル時間 | 162 ms |
| コンパイル使用メモリ | 85,556 KB |
| 実行使用メモリ | 81,380 KB |
| 最終ジャッジ日時 | 2026-04-03 09:10:41 |
| 合計ジャッジ時間 | 1,815 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
N, = map(int, input().split())
from itertools import permutations
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
from collections import defaultdict
D = defaultdict(int)
mx = 0
for x in permutations(X, N):
R = 0
for i in range(N):
a,b=x[i],Y[i]
if a>b:
R+=a-b
D[R] += 1
mx = max(R, mx)
print(D[mx])
nehan_der_thal