結果

問題 No.512 魔法少女の追いかけっこ
ユーザー vorg101vorg101
提出日時 2017-05-05 22:30:40
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 1,034 bytes
コンパイル時間 2,696 ms
コンパイル使用メモリ 103,012 KB
実行使用メモリ 22,960 KB
最終ジャッジ日時 2023-09-09 12:52:22
合計ジャッジ時間 7,618 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,832 KB
testcase_01 AC 58 ms
22,780 KB
testcase_02 AC 58 ms
20,848 KB
testcase_03 AC 57 ms
20,836 KB
testcase_04 AC 57 ms
22,844 KB
testcase_05 AC 56 ms
18,784 KB
testcase_06 AC 57 ms
20,804 KB
testcase_07 AC 57 ms
20,732 KB
testcase_08 AC 58 ms
20,876 KB
testcase_09 AC 57 ms
22,868 KB
testcase_10 AC 56 ms
20,844 KB
testcase_11 AC 57 ms
22,740 KB
testcase_12 AC 58 ms
20,924 KB
testcase_13 AC 57 ms
20,856 KB
testcase_14 AC 55 ms
20,736 KB
testcase_15 AC 57 ms
18,816 KB
testcase_16 AC 57 ms
20,880 KB
testcase_17 AC 57 ms
20,856 KB
testcase_18 AC 57 ms
22,768 KB
testcase_19 AC 57 ms
20,708 KB
testcase_20 AC 59 ms
20,792 KB
testcase_21 AC 59 ms
20,648 KB
testcase_22 AC 58 ms
20,820 KB
testcase_23 AC 58 ms
18,668 KB
testcase_24 AC 58 ms
18,752 KB
testcase_25 AC 58 ms
22,736 KB
testcase_26 AC 57 ms
20,924 KB
testcase_27 AC 57 ms
22,960 KB
testcase_28 AC 58 ms
22,920 KB
testcase_29 AC 58 ms
22,744 KB
testcase_30 AC 57 ms
20,780 KB
testcase_31 AC 57 ms
20,880 KB
testcase_32 AC 58 ms
22,852 KB
testcase_33 AC 57 ms
22,780 KB
testcase_34 AC 57 ms
20,732 KB
testcase_35 AC 57 ms
20,660 KB
testcase_36 AC 60 ms
18,736 KB
testcase_37 AC 57 ms
22,832 KB
testcase_38 AC 58 ms
20,880 KB
testcase_39 AC 57 ms
20,712 KB
testcase_40 AC 58 ms
20,812 KB
testcase_41 AC 57 ms
20,920 KB
testcase_42 AC 57 ms
18,788 KB
testcase_43 AC 58 ms
22,760 KB
testcase_44 AC 58 ms
22,840 KB
testcase_45 AC 57 ms
22,848 KB
testcase_46 AC 57 ms
20,808 KB
testcase_47 AC 58 ms
22,812 KB
testcase_48 AC 57 ms
20,788 KB
testcase_49 AC 57 ms
20,784 KB
testcase_50 AC 57 ms
20,844 KB
testcase_51 AC 57 ms
20,724 KB
testcase_52 AC 57 ms
20,692 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    private static readonly Scanner sc = new Scanner();
    static void Main(string[] args)
    {
        int x = sc.Int;
        int y = sc.Int;
        int n = sc.Int;
        int[] an = new int[n];
        for (int i = 0; i < n; i++)
            an[i] = sc.Int;

        for (int i = 0; i < n-1; i++)
        {
            if ((double)y * an[i] / x > an[i+1])
            {
                Console.WriteLine("NO");
                return;
            }
        }
        Console.WriteLine("YES");
    }
}

class Scanner
{
    private string[] _str = new string[0];
    private int _i;

    public string Str
    {
        get
        {
            if (_i >= _str.Length)
            {
                _str = Console.ReadLine().Split(' ');
                _i = 0;
            }
            return _str[_i++];
        }
    }

    public int Int { get { return int.Parse(Str); } }
    public long Long { get { return long.Parse(Str); } }
    public double Double { get { return double.Parse(Str); } }
}
0