結果

問題 No.512 魔法少女の追いかけっこ
ユーザー pirorirori_n712
提出日時 2018-08-25 04:56:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 597 bytes
コンパイル時間 1,099 ms
コンパイル使用メモリ 111,188 KB
実行使用メモリ 27,272 KB
最終ジャッジ日時 2024-06-23 23:19:32
合計ジャッジ時間 4,181 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

class No512
{
    static void Main()
    {
        var speed = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        var count = Int32.Parse(Console.ReadLine());
        var distance = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        var ans = "YES";
        for (int i = 1; i < count; ++i)
        {
            if (distance[i - 1] * 1000 / speed[0] > distance[i] * 1000 / speed[1])
            {
                ans = "NO";
                break;
            }
        }
        Console.WriteLine(ans);
    }
}
0