結果

問題 No.1944 ∞
ユーザー masayamatumasayamatu
提出日時 2022-06-20 21:49:52
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 1,360 bytes
コンパイル時間 11,946 ms
コンパイル使用メモリ 168,044 KB
実行使用メモリ 203,612 KB
最終ジャッジ日時 2024-04-21 11:47:36
合計ジャッジ時間 15,390 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
30,012 KB
testcase_01 AC 50 ms
29,824 KB
testcase_02 AC 49 ms
29,952 KB
testcase_03 AC 51 ms
29,952 KB
testcase_04 AC 50 ms
29,952 KB
testcase_05 AC 50 ms
30,208 KB
testcase_06 AC 49 ms
30,080 KB
testcase_07 AC 49 ms
29,952 KB
testcase_08 AC 50 ms
30,208 KB
testcase_09 AC 51 ms
29,824 KB
testcase_10 AC 51 ms
30,208 KB
testcase_11 AC 52 ms
29,952 KB
testcase_12 AC 51 ms
30,336 KB
testcase_13 AC 49 ms
30,208 KB
testcase_14 AC 49 ms
29,948 KB
testcase_15 AC 89 ms
53,620 KB
testcase_16 AC 56 ms
32,384 KB
testcase_17 AC 53 ms
30,844 KB
testcase_18 AC 53 ms
31,232 KB
testcase_19 AC 52 ms
30,592 KB
testcase_20 AC 52 ms
31,232 KB
testcase_21 AC 51 ms
30,848 KB
testcase_22 AC 52 ms
30,848 KB
testcase_23 AC 52 ms
30,696 KB
testcase_24 AC 53 ms
30,464 KB
testcase_25 AC 52 ms
31,872 KB
testcase_26 AC 55 ms
31,744 KB
testcase_27 AC 54 ms
31,872 KB
testcase_28 AC 50 ms
30,716 KB
testcase_29 AC 52 ms
30,592 KB
testcase_30 AC 53 ms
31,744 KB
testcase_31 AC 53 ms
30,844 KB
testcase_32 AC 54 ms
31,488 KB
testcase_33 AC 77 ms
43,392 KB
testcase_34 AC 76 ms
43,520 KB
testcase_35 AC 73 ms
203,612 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (91 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
//using static CompLib.CompLib;
//using DataStructure;

namespace atcoder
{
    class Program
    {
        const int intMax = 1000000000;
        const long longMax = 2000000000000000000;
        static void Main(string[] args)
        {
            var NXY = Console.ReadLine().Split().Select(long.Parse).ToArray();
            int N = (int)NXY[0];
            long X = NXY[1];
            long Y = NXY[2];
            var R = Console.ReadLine().Split().Select(long.Parse).ToArray();
            if (N == 1)
            {
                if (R[0] * R[0] == X * X + Y * Y) Console.WriteLine("Yes");
                else Console.WriteLine("No");
            }
            else
            {
                long sum = 0;
                long min = longMax;
                for (int i = 0; i < N; i++)
                {
                    sum += R[i] * 2;
                    min = Math.Min(min, R[i]);
                }
                double d = Math.Sqrt(X * X + Y * Y);
                if (d <= sum - min)
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }
        }
    }
}
0