結果

問題 No.512 魔法少女の追いかけっこ
ユーザー monburan_0401
提出日時 2018-10-04 13:49:39
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 619 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 30,336 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 12:15:23
合計ジャッジ時間 1,463 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 49 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>
int main(void){
    double X,Y;     //  Va,Vb [km/h]
    int N;          //  number of intersection
    int A[80];      //  length of each intersection
    int i;          //  subscript
    double t;       //  time A arrive at A[i]

    scanf("%lf %lf %d",&X,&Y,&N);
    for(i = 0; i < N; i++){
        scanf("%d",&A[i]);
    }

    //  km/h -> m/s
    X /= 3.6;
    Y /= 3.6;

    for(i = 0; i < N - 1; i++){
        //  t = (double)A[i] / X;
        if(A[i] * Y > A[i+1] * X){
            printf("NO\n");
            return 0;
        }
    }

    printf("YES\n");
    return 0;
}
0