結果

問題 No.1279 Array Battle
ユーザー kohei2019kohei2019
提出日時 2020-12-17 01:14:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 302 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 11,964 KB
実行使用メモリ 24,460 KB
最終ジャッジ日時 2023-10-20 10:19:09
合計ジャッジ時間 11,451 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,080 KB
testcase_01 AC 29 ms
10,080 KB
testcase_02 AC 28 ms
10,080 KB
testcase_03 AC 28 ms
10,080 KB
testcase_04 AC 28 ms
10,080 KB
testcase_05 AC 28 ms
10,080 KB
testcase_06 AC 29 ms
10,080 KB
testcase_07 AC 29 ms
10,080 KB
testcase_08 AC 28 ms
10,080 KB
testcase_09 AC 30 ms
10,080 KB
testcase_10 AC 29 ms
10,080 KB
testcase_11 AC 32 ms
10,100 KB
testcase_12 AC 50 ms
10,272 KB
testcase_13 AC 215 ms
11,752 KB
testcase_14 AC 211 ms
11,572 KB
testcase_15 AC 1,723 ms
13,008 KB
testcase_16 AC 1,743 ms
13,008 KB
testcase_17 AC 1,930 ms
24,392 KB
testcase_18 AC 1,860 ms
24,392 KB
testcase_19 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N = int(input())
lsa = map(int,input().split())
lsb = list(map(int,input().split()))
lsp = itertools.permutations(lsa)
ans = 0
ansls = []
for p in lsp:
    ii = 0
    for i in range(N):
        ii += max(p[i]-lsb[i],0)
    ansls.append(ii)
    ans = max(ans,ii)
print(ansls.count(ans))
0