結果

問題 No.3252 Constrained Moving
ユーザー nikoro256
提出日時 2025-09-05 21:28:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 82,964 KB
実行使用メモリ 107,912 KB
最終ジャッジ日時 2025-09-05 21:28:23
合計ジャッジ時間 4,267 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()))
if A[S-1] + A[T-1] <= K:
    print(1)
elif A[S-1] + min(A) <= K and A[T-1] + min(A) <= K:
    print(2)
else:
    print(-1)
0