結果
問題 |
No.1205 Eye Drops
|
ユーザー |
![]() |
提出日時 | 2020-11-30 23:00:20 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 562 bytes |
コンパイル時間 | 140 ms |
コンパイル使用メモリ | 32,404 KB |
実行使用メモリ | 32,788 KB |
最終ジャッジ日時 | 2024-09-13 02:39:07 |
合計ジャッジ時間 | 19,145 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 37 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php list($M,$P,$T) = explode(" ", trim(fgets(STDIN))); $position = 0; $ans = true; $arr_P = array($P); for($i=0;$i<$M;$i++){ //時刻Tに区画Pの+ー1の範囲にいる場合 if ($arr_P[$i] - $T <= $position or $position <= $arr_P[$i] + $T){ //成功時、$Pへ移動する $position = $arr_P[$i]; }else{ //失敗 $ans = false; break; } } if ($ans == true){ printf("Yes"); } else { printf("No"); }