Submission #737389
Source Code Expand
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AtCoderRegularContest033
{
class Program
{
public static void Main(string[] args)
{
long[] arr = ReadLongArray();
long L = arr[0];
long X = arr[1];
long Y = arr[2];
long S = arr[3];
long D = arr[4];
double f = (double)(D - S) / (Y + X);
double r = (double)(L - D + S) / (Y - X);
if (D < S)
{
f = (double)(D + L - S) / (Y + X);
r = (double)(S - D) / (Y - X);
}
if (Y < X || f < r)
{
Console.WriteLine(f);
Console.ReadLine();
}
Console.WriteLine(r);
Console.ReadLine();
}
private static long[] ReadLongArray() { return Array.ConvertAll(Console.ReadLine().Split(' '), e => long.Parse(e)); }
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 動く歩道 |
| User | KingKongAqua |
| Language | C# (Mono 4.6.2.0) |
| Score | 0 |
| Code Size | 1034 Byte |
| Status | WA |
| Exec Time | 33 ms |
| Memory | 2648 KiB |
Judge Result
| Set Name | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 31 ms | 2648 KiB |
| 02.txt | WA | 31 ms | 2648 KiB |
| 03.txt | AC | 31 ms | 2648 KiB |
| 04.txt | WA | 31 ms | 2648 KiB |
| 05.txt | WA | 31 ms | 2648 KiB |
| 06.txt | WA | 33 ms | 2648 KiB |
| 07.txt | WA | 31 ms | 2648 KiB |
| 08.txt | AC | 32 ms | 2648 KiB |
| 09.txt | AC | 32 ms | 2648 KiB |
| 10.txt | WA | 31 ms | 2648 KiB |
| 11.txt | WA | 32 ms | 2648 KiB |
| 12.txt | WA | 32 ms | 2648 KiB |
| 13.txt | WA | 31 ms | 2648 KiB |
| 14.txt | WA | 32 ms | 2648 KiB |
| 15.txt | AC | 33 ms | 2648 KiB |
| 16.txt | AC | 33 ms | 2648 KiB |
| sample_01.txt | WA | 33 ms | 2648 KiB |
| sample_02.txt | AC | 31 ms | 2648 KiB |
| sample_03.txt | WA | 32 ms | 2648 KiB |
| sample_04.txt | WA | 31 ms | 2648 KiB |