結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-16 23:50:51 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 210 ms / 2,000 ms |
| + 837µs | |
| コード長 | 310 bytes |
| 記録 | |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 85,504 KB |
| 最終ジャッジ日時 | 2026-08-29 18:31:39 |
| 合計ジャッジ時間 | 3,757 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from collections import defaultdict import itertools as it n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) cnt = defaultdict(int) for ap in it.permutations(a, n): s = sum(max(0, ap[i] - b[i]) for i in range(n)) cnt[s] += 1 x = max(list(cnt.keys())) print(cnt[x])