結果

問題 No.406 鴨等間隔の法則
ユーザー keymoonkeymoon
提出日時 2019-02-23 18:39:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 633 bytes
コンパイル時間 2,670 ms
コンパイル使用メモリ 105,612 KB
実行使用メモリ 36,272 KB
最終ジャッジ日時 2023-09-21 18:58:28
合計ジャッジ時間 7,966 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
26,388 KB
testcase_01 AC 64 ms
21,744 KB
testcase_02 AC 64 ms
21,944 KB
testcase_03 AC 63 ms
21,692 KB
testcase_04 AC 154 ms
35,804 KB
testcase_05 AC 102 ms
28,100 KB
testcase_06 AC 103 ms
28,160 KB
testcase_07 AC 103 ms
28,264 KB
testcase_08 AC 153 ms
33,480 KB
testcase_09 AC 162 ms
32,156 KB
testcase_10 AC 109 ms
28,504 KB
testcase_11 AC 143 ms
30,588 KB
testcase_12 AC 117 ms
29,060 KB
testcase_13 AC 113 ms
26,832 KB
testcase_14 AC 152 ms
35,016 KB
testcase_15 AC 74 ms
22,364 KB
testcase_16 AC 79 ms
23,020 KB
testcase_17 AC 76 ms
22,556 KB
testcase_18 AC 79 ms
25,040 KB
testcase_19 AC 81 ms
20,940 KB
testcase_20 AC 86 ms
23,060 KB
testcase_21 AC 86 ms
23,436 KB
testcase_22 AC 94 ms
24,088 KB
testcase_23 AC 121 ms
29,304 KB
testcase_24 AC 141 ms
30,232 KB
testcase_25 AC 164 ms
34,276 KB
testcase_26 AC 168 ms
34,376 KB
testcase_27 AC 137 ms
30,484 KB
testcase_28 AC 163 ms
36,272 KB
testcase_29 AC 168 ms
34,292 KB
testcase_30 AC 168 ms
34,164 KB
testcase_31 AC 158 ms
34,012 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.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using Int = System.Int64;
using Debug = System.Diagnostics.Debug;

class P
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split().Select(int.Parse).OrderBy(x => x).ToList();
        Console.WriteLine(a.Distinct().Count() == a.Count() && a.Zip(a.Skip(1), (x, y) => y - x).Distinct().Count() == 1 ? "YES" : "NO"); ;
    }
}
0