結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
ooh_21
|
| 提出日時 | 2017-06-01 21:50:52 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,123 bytes |
| コンパイル時間 | 993 ms |
| コンパイル使用メモリ | 107,008 KB |
| 実行使用メモリ | 19,328 KB |
| 最終ジャッジ日時 | 2024-06-27 06:32:47 |
| 合計ジャッジ時間 | 3,884 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 3 RE * 28 |
コンパイルメッセージ
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)
{
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 < road.Length; i++)
{
double kyori = spY * road[i] / spX;
if (kyori > road[i + 1])
{
look = "NO";
break;
}
}
Console.WriteLine(look);
}
}
}
ooh_21