結果
| 問題 |
No.1279 Array Battle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-22 18:30:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 458 ms |
| コンパイル使用メモリ | 82,252 KB |
| 実行使用メモリ | 76,096 KB |
| 最終ジャッジ日時 | 2025-04-22 18:30:17 |
| 合計ジャッジ時間 | 2,793 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)