結果

問題 No.3325 陰陽師
コンテスト
ユーザー Meso Meso
提出日時 2025-11-03 19:40:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 390 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 42,920 KB
最終ジャッジ日時 2025-11-03 19:41:06
合計ジャッジ時間 13,823 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n, m = map(int, input().split())
s = list(map(int, input().split()))
t = list(map(int, input().split()))

s.sort()
t.sort()
burden = 0
used = [False] * n  

si = 0 

for tj in t:
    i = bisect.bisect_left(s, tj, si)
    while i < n and used[i]:
        i += 1
    if i >= n:
        break
    burden = max(burden, s[i] - tj)
    used[i] = True
    si = i + 1 

print(burden)
0