結果

問題 No.513 宝探し2
ユーザー RisenRisen
提出日時 2017-06-02 21:14:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 713 bytes
コンパイル時間 2,298 ms
コンパイル使用メモリ 105,600 KB
実行使用メモリ 38,612 KB
平均クエリ数 2.92
最終ジャッジ日時 2023-09-24 01:19:36
合計ジャッジ時間 4,163 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
36,652 KB
testcase_01 AC 83 ms
36,688 KB
testcase_02 AC 81 ms
36,860 KB
testcase_03 AC 82 ms
38,512 KB
testcase_04 AC 82 ms
36,752 KB
testcase_05 AC 80 ms
36,316 KB
testcase_06 AC 82 ms
36,804 KB
testcase_07 AC 82 ms
36,392 KB
testcase_08 AC 83 ms
36,636 KB
testcase_09 AC 85 ms
36,828 KB
testcase_10 AC 82 ms
38,612 KB
testcase_11 AC 82 ms
36,392 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.Drawing;

public struct Point
{
    public int X;
    public int Y;

    public Point(int x, int y)
    {
        X = x;
        Y = y;
    }
    public override string ToString()
    {
        return $"{X} {Y}";
    }
}

public class Solution
{
    public static int GetDistance(Point p)
    {
        Console.WriteLine(p);
        return int.Parse(Console.ReadLine());
    }

    public static void Main()
    {
        Point result = new Point(0, 0);
        var d0 = GetDistance(new Point(0, 0));
        if (d0 != 0)
        {
            var d1 = GetDistance(new Point(d0, 0)) / 2;
            result = new Point(d0 - d1, d1);
        }

        Console.WriteLine(result);
    }
}
0