結果

問題 No.3252 Constrained Moving
ユーザー Kude
提出日時 2025-09-05 21:21:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 107,932 KB
最終ジャッジ日時 2025-09-05 21:21:47
合計ジャッジ時間 4,734 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

n, s, t, k = map(int, input().split())
a = list(map(int, input().split()))
s -= 1
t -= 1
print(1 if a[s] + a[t] <= k else 2 if max(a[s], a[t]) + min(a) <= k else -1)
0