結果

問題 No.1279 Array Battle
ユーザー osrgy01osrgy01
提出日時 2021-05-05 14:12:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 281 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 19,140 KB
最終ジャッジ日時 2023-10-11 07:55:18
合計ジャッジ時間 5,686 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,300 KB
testcase_01 AC 16 ms
8,132 KB
testcase_02 AC 16 ms
8,240 KB
testcase_03 AC 16 ms
8,136 KB
testcase_04 AC 16 ms
8,108 KB
testcase_05 AC 16 ms
8,120 KB
testcase_06 AC 16 ms
8,228 KB
testcase_07 AC 16 ms
8,200 KB
testcase_08 AC 16 ms
8,120 KB
testcase_09 AC 15 ms
8,176 KB
testcase_10 AC 16 ms
8,076 KB
testcase_11 AC 27 ms
8,292 KB
testcase_12 AC 479 ms
8,892 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

n=int(input())
a=[*map(int,input().split())]
b=[*map(int,input().split())]
A=[*itertools.permutations(a)]
chk=[]
for i in A:
    cnt=0
    for j in range(n):
        if i[j]>b[j]:
            cnt+=i[j]-b[j]
    chk.append(cnt)
print(sum(max(chk)==i for i in chk))
0