結果

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

ソースコード

diff #

n,s,t,k,*a=map(int,open(0).read().split())
s-=1;t-=1
if a[s]+a[t]<=k:
  exit(print(1))
m=min(a)
if a[s]+m<=k and a[t]+m<=k:
  exit(print(2))
print(-1)
0