結果
問題 | No.1282 Display Elements |
ユーザー |
|
提出日時 | 2025-03-09 20:09:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 552 ms / 2,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 26,344 KB |
最終ジャッジ日時 | 2025-03-09 20:09:54 |
合計ジャッジ時間 | 6,578 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
import bisectn = int(input())A = list(map(int, input().split()))B = list(map(int, input().split()))A.sort()ans1 = []ans2 = []result = 0for i in range(n):result += bisect.bisect_left(ans1, A[i])ans2.append(B[i])ans2.sort()result += bisect.bisect_left(ans2, A[i])if len(ans2) == 300:ans1.extend(ans2)ans1.sort()ans2.clear()print(result)