結果
| 問題 | No.1279 Array Battle | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-03-05 22:55:35 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 637 ms / 2,000 ms | 
| コード長 | 340 bytes | 
| コンパイル時間 | 321 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-10-07 04:15:16 | 
| 合計ジャッジ時間 | 4,556 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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])
            
            
            
        