結果

問題 No.512 魔法少女の追いかけっこ
ユーザー ooh_21
提出日時 2017-06-01 21:51:56
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,110 bytes
コンパイル時間 866 ms
コンパイル使用メモリ 112,556 KB
実行使用メモリ 27,392 KB
最終ジャッジ日時 2024-06-27 06:32:55
合計ジャッジ時間 3,496 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 pj12
{
    class Program
    {
        static void Main(string[] args)
        {
            double[] speed = Console.ReadLine().Trim().Split(' ').Select(x => double.Parse(x)).ToArray();
            double spX = speed[0] * 1000 / 3600;
            double spY = speed[1] * 1000 / 3600;

            int coner = int.Parse(Console.ReadLine());

            String look = "YES";

            double[] road = new double[coner];
            double[] line = Console.ReadLine().Trim().Split(' ').Select(x => double.Parse(x)).ToArray();
            for(int i = 0;i < coner;i++)
            {
                road[i] = line[i];
            }

            double X = spX, Y = spY;

            for(int i = 0;i < coner-1;i++)
            {
                double kyori = spY * road[i] / spX;
                if(kyori > road[i+1])
                {
                    look = "NO";
                    break;
                }
            }
            Console.WriteLine(look);
        }
    }
}
0