結果
問題 |
No.3252 Constrained Moving
|
ユーザー |
![]() |
提出日時 | 2025-09-06 01:36:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 99 ms / 2,000 ms |
コード長 | 197 bytes |
コンパイル時間 | 327 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 32,144 KB |
最終ジャッジ日時 | 2025-09-06 01:36:50 |
合計ジャッジ時間 | 4,603 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
N,S,T,K=map(int,input().split()) A=list(map(int,input().split())) S-=1 T-=1 if A[S]+A[T]<=K: print(1) exit() MIN=min(A) if A[S]+MIN<=K and A[T]+MIN<=K: print(2) else: print(-1)