結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-05 22:55:35 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 429 ms / 2,000 ms |
| + 100µs | |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2026-09-11 10:03:30 |
| 合計ジャッジ時間 | 4,045 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from collections import defaultdict
from itertools import permutations
N = int(input())
A = tuple(map(int, input().split()))
B = tuple(map(int, input().split()))
score = defaultdict(int)
for a in permutations(A):
n = sum([i-j for i,j in zip(a, B) if i > j])
score[n] += 1
ans = sorted(score.items(), reverse=1)
print(ans[0][1])