結果

問題 No.1279 Array Battle
ユーザー 👑 H20H20
提出日時 2021-02-09 09:31:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 132,056 KB
最終ジャッジ日時 2023-09-20 19:51:55
合計ジャッジ時間 3,960 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 75 ms
71,088 KB
testcase_02 AC 75 ms
71,376 KB
testcase_03 AC 75 ms
71,344 KB
testcase_04 WA -
testcase_05 AC 73 ms
71,240 KB
testcase_06 WA -
testcase_07 AC 75 ms
71,340 KB
testcase_08 AC 73 ms
71,112 KB
testcase_09 AC 74 ms
71,496 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 96 ms
78,540 KB
testcase_14 WA -
testcase_15 AC 192 ms
131,524 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

mp = 0
cnt = 0
for l in list(itertools.permutations(A)):
    point=0
    for i in range(N):
        point+=max(0,l[i]-B[i])
    if mp == point:
        cnt+=1
    elif mp<point:
        mp=point
        cnt+=1
print(cnt)

0