結果

問題 No.406 鴨等間隔の法則
ユーザー _matumo__matumo_
提出日時 2018-08-13 22:36:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 601 bytes
コンパイル時間 2,096 ms
コンパイル使用メモリ 105,884 KB
実行使用メモリ 32,396 KB
最終ジャッジ日時 2023-09-21 18:52:42
合計ジャッジ時間 7,262 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
26,228 KB
testcase_01 AC 65 ms
25,568 KB
testcase_02 AC 64 ms
21,644 KB
testcase_03 AC 65 ms
21,780 KB
testcase_04 AC 153 ms
29,720 KB
testcase_05 AC 101 ms
23,784 KB
testcase_06 AC 103 ms
23,896 KB
testcase_07 AC 104 ms
24,124 KB
testcase_08 AC 151 ms
29,620 KB
testcase_09 AC 159 ms
30,164 KB
testcase_10 AC 106 ms
24,236 KB
testcase_11 AC 139 ms
28,912 KB
testcase_12 AC 114 ms
24,980 KB
testcase_13 AC 113 ms
26,768 KB
testcase_14 AC 146 ms
29,412 KB
testcase_15 AC 76 ms
24,280 KB
testcase_16 AC 79 ms
24,364 KB
testcase_17 AC 75 ms
22,144 KB
testcase_18 AC 78 ms
22,480 KB
testcase_19 AC 80 ms
22,472 KB
testcase_20 AC 83 ms
24,924 KB
testcase_21 AC 83 ms
22,776 KB
testcase_22 AC 90 ms
23,508 KB
testcase_23 AC 119 ms
29,204 KB
testcase_24 AC 136 ms
30,768 KB
testcase_25 AC 163 ms
30,248 KB
testcase_26 AC 161 ms
30,392 KB
testcase_27 AC 141 ms
30,372 KB
testcase_28 AC 160 ms
30,268 KB
testcase_29 AC 161 ms
32,396 KB
testcase_30 AC 159 ms
32,292 KB
testcase_31 AC 155 ms
30,032 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;
using System.Text;

namespace YukiCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int nn = int.Parse(Console.ReadLine());
            var va = Console.ReadLine().Split().Select(int.Parse).OrderBy(n=>n).ToArray();
            var vb = va.Skip(1).Select((n, i) => n - va[i]);
            int max = vb.Max();
            int min = vb.Min();
            var ss = max != min ? "NO" : max == 0 ? "NO" : "YES";
            Console.WriteLine(ss);
            Console.ReadLine();
        }
    }
}
0