結果

問題 No.1279 Array Battle
ユーザー ayaoniayaoni
提出日時 2020-11-06 21:26:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 747 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 145,036 KB
最終ジャッジ日時 2023-09-29 18:06:52
合計ジャッジ時間 4,020 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
71,852 KB
testcase_01 AC 94 ms
71,588 KB
testcase_02 WA -
testcase_03 AC 92 ms
71,660 KB
testcase_04 AC 90 ms
71,800 KB
testcase_05 AC 90 ms
71,588 KB
testcase_06 AC 90 ms
71,436 KB
testcase_07 AC 91 ms
71,832 KB
testcase_08 AC 90 ms
71,880 KB
testcase_09 AC 90 ms
71,664 KB
testcase_10 AC 91 ms
71,740 KB
testcase_11 AC 105 ms
77,512 KB
testcase_12 AC 109 ms
77,920 KB
testcase_13 AC 116 ms
82,024 KB
testcase_14 WA -
testcase_15 AC 247 ms
143,584 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import permutations
from collections import Counter
sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
A = LI()
B = LI()

ANS = []
for X in list(permutations([i for i in range(N)],N)):
    a = 0
    for i in range(N):
        a += max(0,A[X[i]]-B[i])
    ANS.append(a)

count = Counter(ANS)
print(count.most_common()[0][1])
0