結果
| 問題 | No.1722 [Cherry 3rd Tune C] In my way |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-06 04:12:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 370 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 63,488 KB |
| 最終ジャッジ日時 | 2026-05-17 08:41:10 |
| 合計ジャッジ時間 | 2,532 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
import bisect
N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Y.sort()
ans = []
for x in X:
pos = bisect.bisect_left(Y, x)
if pos==M:
ans.append("Infinity")
else:
ans.append(Y[pos]-x)
for a in ans:
print(a)