結果
問題 | No.1282 Display Elements |
ユーザー | aqua_tenhou |
提出日時 | 2020-11-06 21:55:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 160 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 82,000 KB |
実行使用メモリ | 99,840 KB |
最終ジャッジ日時 | 2024-07-22 12:44:23 |
合計ジャッジ時間 | 2,909 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
import bisect n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) a = sorted(a) ans = 0 for i, x in enumerate(b): p = bisect.bisect_right(a, x) if p < i: ans += n - i else: ans += n - p print(ans)