結果

問題 No.1279 Array Battle
ユーザー jensenjensen
提出日時 2021-01-03 18:23:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 53,888 KB
最終ジャッジ日時 2024-04-21 13:34:27
合計ジャッジ時間 12,416 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 31 ms
10,624 KB
testcase_02 WA -
testcase_03 AC 33 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 33 ms
10,624 KB
testcase_06 AC 32 ms
10,752 KB
testcase_07 AC 32 ms
10,624 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 1,728 ms
53,760 KB
testcase_16 WA -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
t=0
score=0
bestscore=0
for x in list(permutations(a)):
    for i in range(N):
        score+=max((x[i]-b[i]),0)
       
    if(score>bestscore):
        bestscore=score
        t=1
    if(score==bestscore):
        t+=1
print(t) 
0