結果
問題 | No.1282 Display Elements |
ユーザー |
![]() |
提出日時 | 2020-11-07 00:43:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 31,096 KB |
最終ジャッジ日時 | 2024-07-22 13:57:27 |
合計ジャッジ時間 | 12,627 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 TLE * 5 |
ソースコード
from bisect import bisect_left N = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) a.sort() t0 = [] t1 = [] result = 0 for i in range(N): c = a[i] t1.append(b[i]) result += bisect_left(t0, c) result += sum(1 for b in t1 if b < c) if len(t1) == 1000: t0.extend(t1) t0.sort() t1 = [] print(result)