結果

問題 No.1205 Eye Drops
ユーザー hiramarihiramari
提出日時 2020-11-30 23:16:37
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 522 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 18,560 KB
実行使用メモリ 19,080 KB
最終ジャッジ日時 2023-10-11 03:08:57
合計ジャッジ時間 2,536 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
18,676 KB
testcase_02 WA -
testcase_03 AC 16 ms
18,864 KB
testcase_04 AC 15 ms
18,964 KB
testcase_05 AC 15 ms
18,784 KB
testcase_06 AC 16 ms
18,964 KB
testcase_07 AC 16 ms
18,784 KB
testcase_08 AC 16 ms
18,784 KB
testcase_09 AC 16 ms
18,808 KB
testcase_10 AC 16 ms
18,948 KB
testcase_11 WA -
testcase_12 AC 15 ms
18,888 KB
testcase_13 WA -
testcase_14 AC 15 ms
18,856 KB
testcase_15 AC 15 ms
18,784 KB
testcase_16 WA -
testcase_17 AC 15 ms
18,880 KB
testcase_18 WA -
testcase_19 AC 15 ms
18,932 KB
testcase_20 AC 15 ms
18,824 KB
testcase_21 AC 15 ms
18,972 KB
testcase_22 AC 15 ms
18,812 KB
testcase_23 WA -
testcase_24 AC 15 ms
18,876 KB
testcase_25 AC 15 ms
18,952 KB
testcase_26 AC 16 ms
18,880 KB
testcase_27 AC 15 ms
18,916 KB
testcase_28 AC 16 ms
18,936 KB
testcase_29 AC 15 ms
18,856 KB
testcase_30 AC 16 ms
18,660 KB
testcase_31 AC 15 ms
18,884 KB
testcase_32 AC 16 ms
18,876 KB
testcase_33 AC 15 ms
18,812 KB
testcase_34 AC 16 ms
18,836 KB
testcase_35 AC 15 ms
18,952 KB
testcase_36 AC 15 ms
18,792 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?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);
0