結果

問題 No.3252 Constrained Moving
ユーザー tikuwa_
提出日時 2025-09-05 15:14:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 185 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,172 KB
実行使用メモリ 107,928 KB
最終ジャッジ日時 2025-09-05 16:35:28
合計ジャッジ時間 4,343 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

N,S,T,K=map(int,input().split()) ; S-=1 ; T-=1
A=list(map(int,input().split()))
if A[S]+A[T]<=K : exit(print(1))
elif A[S]+min(A)<=K and A[T]+min(A)<=K : exit(print(2))
else : print(-1)
0