結果

問題 No.512 魔法少女の追いかけっこ
ユーザー kimny
提出日時 2017-12-08 21:46:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 887 bytes
コンパイル時間 773 ms
コンパイル使用メモリ 111,532 KB
実行使用メモリ 26,132 KB
最終ジャッジ日時 2024-06-27 06:48:59
合計ジャッジ時間 3,536 ms
ジャッジサーバーID
(参考情報)
judge1 / 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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoder_512 {
    class Program {
        static void Main(string[] args) {
            string[] s = Console.ReadLine().Split(' ');
            double x = double.Parse(s[0]);
            double y = double.Parse(s[1]);
            int n = int.Parse(Console.ReadLine());
            double[] a = new double[n];
            string[] t = Console.ReadLine().Split(' ');
            for(int i = 0; i < t.Length; i++) {
                a[i] = double.Parse(t[i]);
            }
            int judge = 0;
            for(int i = 1; i < t.Length; i++) {
                if (a[i] / y < a[i - 1] / x) judge++;
            }
            if (judge > 0) Console.WriteLine("NO");
            else Console.WriteLine("YES");
            Console.ReadLine();
        }
    }
}
0