結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
hiramari
|
| 提出日時 | 2020-11-30 23:16:37 |
| 言語 | PHP (843.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 522 bytes |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 32,144 KB |
| 実行使用メモリ | 32,916 KB |
| 最終ジャッジ日時 | 2024-09-13 02:39:55 |
| 合計ジャッジ時間 | 3,054 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 = "Yes";
$arr_P = array($P);
$arr_T = array($T);
for($i=0;$i<$M;$i++){
//時刻Tに区画Pの+-Tの範囲にいる場合
if ($arr_P[$i] - $arr_T[$i] <= $position and $position <= $arr_P[$i] + $arr_T[$i]){
//成功時、$Pへ移動する
$position = $arr_P[$i];
}else{
//失敗
$ans = "No";
break;
}
}
printf($ans);
hiramari