結果

問題 No.1279 Array Battle
ユーザー jensenjensen
提出日時 2021-01-03 18:35:19
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 381 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 55,980 KB
最終ジャッジ日時 2023-08-03 15:33:45
合計ジャッジ時間 5,549 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

from itertools import permutations
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
t=0

bestscore=0
for x in list(permutations(a)):
    score=0
    for i in range(N):
        score+=max((x[i]-b[i]),0)
        print(score)
       
    if(score==bestscore):
        t+=1   
    if(score>bestscore):
        bestscore=score
        t=1    
print(t)   
0