結果
| 問題 | No.1279 Array Battle | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-11-07 11:23:05 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 577 ms / 2,000 ms | 
| コード長 | 463 bytes | 
| コンパイル時間 | 83 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-22 14:23:32 | 
| 合計ジャッジ時間 | 3,892 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 20 | 
ソースコード
from collections import defaultdict
from itertools import permutations
from sys import stdin
def main():
    input = lambda: stdin.readline()[:-1]
    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])
main()
            
            
            
        