結果

問題 No.1282 Display Elements
ユーザー c-yanc-yan
提出日時 2020-11-06 22:28:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 76,232 KB
最終ジャッジ日時 2023-09-29 19:07:21
合計ジャッジ時間 6,869 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 74 ms
71,288 KB
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 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left

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

a.sort()
t = []
result = 0
for i in range(N):
    t.append(b[i])
    t.sort()
    result += len(t) - bisect_left(t, a[i])
print(result)
0