結果
問題 | No.1279 Array Battle |
ユーザー | jensen |
提出日時 | 2021-01-03 18:23:43 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 469 ms |
コンパイル使用メモリ | 10,728 KB |
実行使用メモリ | 51,092 KB |
最終ジャッジ日時 | 2023-08-03 15:23:04 |
合計ジャッジ時間 | 10,607 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 16 ms
8,320 KB |
testcase_02 | WA | - |
testcase_03 | AC | 16 ms
8,268 KB |
testcase_04 | WA | - |
testcase_05 | AC | 16 ms
8,264 KB |
testcase_06 | AC | 15 ms
8,172 KB |
testcase_07 | AC | 16 ms
8,320 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,570 ms
51,088 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
ソースコード
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)