結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-06-05 12:16:48 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 1,053 bytes |
コンパイル時間 | 1,066 ms |
コンパイル使用メモリ | 113,328 KB |
実行使用メモリ | 19,328 KB |
最終ジャッジ日時 | 2024-06-27 06:33:48 |
合計ジャッジ時間 | 4,034 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
コンパイルメッセージ
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 lecture { class Program { static void Main(string[] args) { // 入力 int[] line = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray(); int X = line[0]; int Y = line[1]; int N = int.Parse(Console.ReadLine()); int[] Len = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray(); bool result = true; // ああああ for(int i = 0;i < N - 1; i++) { if (Len[i] * Y > Len[i + 1] * X) { result = false; break; } } // 出力あ if(result == true) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } } }