結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-06-05 10:20:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,218 bytes |
コンパイル時間 | 1,546 ms |
コンパイル使用メモリ | 107,520 KB |
実行使用メモリ | 19,200 KB |
最終ジャッジ日時 | 2024-06-27 06:33:37 |
合計ジャッジ時間 | 3,768 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 48 WA * 5 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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) { //デバック用 //Console.SetIn(new System.IO.StreamReader("../../input.txt")); float[] speed = Console.ReadLine().Trim().Split(' ').Select(x => float.Parse(x)).ToArray(); float spX = speed[0] * 1000 / 3600; float spY = speed[1] * 1000 / 3600; int coner = int.Parse(Console.ReadLine()); String look = "YES"; float[] road = new float[coner]; float[] line = Console.ReadLine().Trim().Split(' ').Select(x => float.Parse(x)).ToArray(); for (int i = 0; i < coner; i++) { road[i] = line[i]; } float X = spX, Y = spY; for (int i = 0; i < coner - 1; i++) { float kyori = spY * road[i] / spX; if (kyori > road[i + 1]) { look = "NO"; break; } } Console.WriteLine(look); } } }