結果

問題 No.1279 Array Battle
コンテスト
ユーザー 野田正太
提出日時 2020-12-02 13:05:42
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 310 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 369 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 20,700 KB
最終ジャッジ日時 2026-04-04 04:24:07
合計ジャッジ時間 5,787 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import itertools
itertools.permutations()
n=int(input())
a=[int(s)for s in input().split()]
b=[int(x)for x in input().split()]
a.sort()
b.sort(reverse=True)
d={}
for i in permutations(a):
    t=0
    print(t)
    for j in range(n):
        t+=max(i[j]-b[j],0)
        print(t)
    d.setdefault(t,0)
    d[t]+=1
0