結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2017-05-06 14:41:41 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,035 bytes |
| コンパイル時間 | 917 ms |
| コンパイル使用メモリ | 110,976 KB |
| 実行使用メモリ | 29,184 KB |
| 最終ジャッジ日時 | 2024-06-27 06:19:49 |
| 合計ジャッジ時間 | 3,631 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 int X, Y;
private int N;
private double[] A;
private void Scan()
{
var line = Console.ReadLine().Split(' ');
X = int.Parse(line[0]);
Y = int.Parse(line[1]);
N = int.Parse(Console.ReadLine());
A = Console.ReadLine().Split(' ').Select(i => int.Parse(i) * 3.6 ).ToArray();
}
public void Solve()
{
Scan();
double sumX=0;
double 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");
}
}
mban