結果

問題 No.1282 Display Elements
ユーザー 👑 timitimi
提出日時 2020-11-16 16:49:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 933 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 1,372 ms
コンパイル使用メモリ 86,932 KB
実行使用メモリ 96,976 KB
最終ジャッジ日時 2023-09-30 07:19:36
合計ジャッジ時間 8,377 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,344 KB
testcase_01 AC 62 ms
71,084 KB
testcase_02 AC 63 ms
71,144 KB
testcase_03 AC 61 ms
71,552 KB
testcase_04 AC 62 ms
71,128 KB
testcase_05 AC 63 ms
71,488 KB
testcase_06 AC 60 ms
71,376 KB
testcase_07 AC 62 ms
71,100 KB
testcase_08 AC 61 ms
71,524 KB
testcase_09 AC 61 ms
71,440 KB
testcase_10 AC 82 ms
76,388 KB
testcase_11 AC 71 ms
76,392 KB
testcase_12 AC 64 ms
75,212 KB
testcase_13 AC 69 ms
75,244 KB
testcase_14 AC 71 ms
76,448 KB
testcase_15 AC 498 ms
96,360 KB
testcase_16 AC 175 ms
86,504 KB
testcase_17 AC 388 ms
96,568 KB
testcase_18 AC 220 ms
89,088 KB
testcase_19 AC 905 ms
96,320 KB
testcase_20 AC 933 ms
96,396 KB
testcase_21 AC 579 ms
96,948 KB
testcase_22 AC 571 ms
96,976 KB
testcase_23 AC 579 ms
96,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
A=sorted(A)
import bisect
D=[]
ans=0
for i in range(N):
  bisect.insort_left(D,B[i])
  d=bisect.bisect_left(D,A[i])
  ans+=d
print(ans)
0