結果

問題 No.512 魔法少女の追いかけっこ
ユーザー mban
提出日時 2017-05-06 14:54:53
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 934 bytes
コンパイル時間 984 ms
コンパイル使用メモリ 108,032 KB
実行使用メモリ 19,456 KB
最終ジャッジ日時 2024-06-27 06:20:08
合計ジャッジ時間 3,634 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Linq;

class Program
{
    static void Main()
    {
        new Magatro().Solve();
    }
}

class Magatro
{
    private int X, Y;
    private int N;
    private decimal[] A;
    private void Scan()
    {
        var line = Console.ReadLine().Split(' ');
        X = int.Parse(line[0]);
        Y = int.Parse(line[1]);
        N = int.Parse(Console.ReadLine());
        A = Console.ReadLine().Split(' ').Select(i => int.Parse(i) * 3.6m).ToArray();
    }

    public void Solve()
    {
        Scan();
        for (int i = 0; i < N - 1; i++)
        {
            if (A[i] * Y / X > A[i+1])
            {
                Console.WriteLine("NO");
                return;
            }
        }
        Console.WriteLine("YES");
    }
}

0