結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-05-06 14:39:27 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,021 bytes |
コンパイル時間 | 951 ms |
コンパイル使用メモリ | 106,880 KB |
実行使用メモリ | 19,328 KB |
最終ジャッジ日時 | 2024-06-27 06:19:21 |
合計ジャッジ時間 | 3,696 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 49 WA * 4 |
コンパイルメッセージ
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; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.IO; using System.Linq; class Program { static void Main() { new Magatro().Solve(); } } class Magatro { private double X, Y; private int N; private int[] A; private void Scan() { var line = Console.ReadLine().Split(' '); X = int.Parse(line[0])/3.6; Y = int.Parse(line[1])/3.6; N = int.Parse(Console.ReadLine()); A = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); } public void Solve() { Scan(); int sumX=0; int sumY = A[0]; for (int i = 0; i < N-1; i++) { sumX += A[i]; sumY += A[i + 1]; if (sumX * Y / X>sumY) { Console.WriteLine("NO"); return; } } Console.WriteLine("YES"); } }