結果

問題 No.410 出会い
ユーザー 明智重蔵明智重蔵
提出日時 2016-09-10 11:35:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 1,502 bytes
コンパイル時間 2,417 ms
コンパイル使用メモリ 104,084 KB
実行使用メモリ 24,124 KB
最終ジャッジ日時 2023-09-10 20:08:47
合計ジャッジ時間 5,000 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
21,948 KB
testcase_01 AC 68 ms
21,884 KB
testcase_02 AC 70 ms
22,148 KB
testcase_03 AC 68 ms
21,856 KB
testcase_04 AC 70 ms
24,036 KB
testcase_05 AC 70 ms
24,004 KB
testcase_06 AC 69 ms
22,032 KB
testcase_07 AC 70 ms
24,076 KB
testcase_08 AC 69 ms
21,912 KB
testcase_09 AC 69 ms
24,084 KB
testcase_10 AC 69 ms
19,904 KB
testcase_11 AC 68 ms
21,988 KB
testcase_12 AC 69 ms
21,988 KB
testcase_13 AC 69 ms
21,960 KB
testcase_14 AC 70 ms
22,092 KB
testcase_15 AC 70 ms
22,080 KB
testcase_16 AC 70 ms
22,036 KB
testcase_17 AC 69 ms
24,124 KB
testcase_18 AC 70 ms
22,080 KB
testcase_19 AC 69 ms
21,952 KB
testcase_20 AC 68 ms
24,100 KB
testcase_21 AC 68 ms
21,852 KB
testcase_22 AC 68 ms
21,952 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

//YukiCoder410 出会い
//http://yukicoder.me/problems/no/410
class Program
{
    static string InputPattern = "InputX";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("0 0");
            WillReturn.Add("2 0");
            //1
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("0 0");
            WillReturn.Add("3 0");
            //1.5
        }
        else if (InputPattern == "Input3") {
            WillReturn.Add("0 0");
            WillReturn.Add("5 1");
            //3
        }
        else if (InputPattern == "Input4") {
            WillReturn.Add("-12345 6789");
            WillReturn.Add("1234 -56789");
            //38578.5
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();

        decimal[] wkArr = { };
        Action<string> SplitAct = pStr =>
            wkArr = pStr.Split(' ').Select(X => decimal.Parse(X)).ToArray();

        SplitAct(InputList[0]);
        decimal PX = wkArr[0], PY = wkArr[1];

        SplitAct(InputList[1]);
        decimal QX = wkArr[0], QY = wkArr[1];

        Console.WriteLine(Math.Abs(PX - QX) / 2M + Math.Abs(PY - QY) / 2M);
    }
}
0