結果

問題 No.1279 Array Battle
ユーザー c-yanc-yan
提出日時 2020-11-06 22:05:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 8,268 KB
最終ジャッジ日時 2023-09-29 18:47:10
合計ジャッジ時間 2,651 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
8,176 KB
testcase_01 AC 14 ms
8,108 KB
testcase_02 WA -
testcase_03 AC 13 ms
8,024 KB
testcase_04 AC 14 ms
8,100 KB
testcase_05 AC 14 ms
8,132 KB
testcase_06 AC 13 ms
8,084 KB
testcase_07 AC 13 ms
8,180 KB
testcase_08 AC 13 ms
8,064 KB
testcase_09 AC 14 ms
8,108 KB
testcase_10 AC 14 ms
8,072 KB
testcase_11 AC 14 ms
8,104 KB
testcase_12 AC 17 ms
8,036 KB
testcase_13 AC 43 ms
8,208 KB
testcase_14 AC 42 ms
8,116 KB
testcase_15 AC 290 ms
8,028 KB
testcase_16 WA -
testcase_17 AC 309 ms
8,076 KB
testcase_18 AC 282 ms
8,108 KB
testcase_19 AC 344 ms
8,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

a.sort()
b.sort(reverse=True)

t = set(a[i] for i in range(N) if a[i] >= b[i])
result = 0
for x in permutations(a):
    if t == set(list(x)[:len(t)]):
        result += 1
print(result)
0