結果

問題 No.512 魔法少女の追いかけっこ
ユーザー akichi
提出日時 2017-08-19 14:02:06
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 535 bytes
コンパイル時間 827 ms
コンパイル使用メモリ 110,156 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2024-06-27 06:42:48
合計ジャッジ時間 3,603 ms
ジャッジサーバーID
(参考情報)
judge2 / 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 Program {
    static void Main() {
        int[] xy = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int x = xy[0], y = xy[1];
        int n = int.Parse(Console.ReadLine());
        int[] As = Console.ReadLine().Split().Select(int.Parse).ToArray();
        string ans = "YES";
        for (int i = 0; i < n - 1; i++) {
            if (As[i + 1] * x < As[i] * y) {
                ans = "NO";
                break;
            }
        }
        Console.WriteLine(ans);
    }
}
0