結果

問題 No.512 魔法少女の追いかけっこ
コンテスト
ユーザー kimny
提出日時 2017-12-08 21:46:56
言語 C#(csc)
(csc 3.9.0)
コンパイル:
csc -langversion:latest -unsafe -warn:0 -o+ /r:System.Numerics.dll _filename_ -out:a.exe
実行:
/usr/bin/mono a.exe
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 887 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 593 ms
コンパイル使用メモリ 104,704 KB
実行使用メモリ 18,816 KB
最終ジャッジ日時 2026-03-14 16:48:58
合計ジャッジ時間 2,803 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #
raw source code

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