結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-22 18:30:14 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 331 bytes |
| 記録 | |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 83,840 KB |
| 最終ジャッジ日時 | 2026-07-10 04:02:58 |
| 合計ジャッジ時間 | 2,893 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from itertools import permutations
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
smax = 0
for z in permutations(A):
cnt = 0
for i in range(N):
cnt += max(z[i]-B[i],0)
if cnt>smax:
smax = cnt
ans = 1
elif cnt==smax:
ans += 1
print(ans)