結果
| 問題 | No.1279 Array Battle | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-11-26 00:12:52 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                TLE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 357 bytes | 
| コンパイル時間 | 232 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-23 19:34:13 | 
| 合計ジャッジ時間 | 11,734 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 17 TLE * 3 | 
ソースコード
import itertools
n = int(input())
alst = list(map(int, input().split()))
blst = list(map(int, input().split()))
max_ = -1
ans = 0
for lst in itertools.permutations(alst):
    total = 0
    for a, b in zip(lst, blst):
        total += max(a - b, 0)
    if max_ == total:
        ans += 1
    elif max_ < total:
        max_ = total
        ans = 1
print(ans)
            
            
            
        