結果

問題 No.406 鴨等間隔の法則
ユーザー bluemeganebluemegane
提出日時 2018-09-17 20:00:31
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 460 bytes
コンパイル時間 2,070 ms
コンパイル使用メモリ 104,144 KB
実行使用メモリ 30,172 KB
最終ジャッジ日時 2023-09-25 09:33:47
合計ジャッジ時間 7,010 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
22,804 KB
testcase_01 RE -
testcase_02 AC 58 ms
20,732 KB
testcase_03 RE -
testcase_04 AC 117 ms
27,664 KB
testcase_05 AC 84 ms
24,588 KB
testcase_06 AC 84 ms
22,640 KB
testcase_07 AC 86 ms
24,652 KB
testcase_08 AC 116 ms
27,584 KB
testcase_09 AC 122 ms
30,036 KB
testcase_10 AC 88 ms
22,768 KB
testcase_11 AC 110 ms
27,064 KB
testcase_12 AC 93 ms
25,168 KB
testcase_13 AC 92 ms
25,672 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 70 ms
21,312 KB
testcase_17 AC 69 ms
20,964 KB
testcase_18 AC 69 ms
23,224 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 71 ms
21,516 KB
testcase_22 RE -
testcase_23 AC 95 ms
27,692 KB
testcase_24 RE -
testcase_25 AC 123 ms
30,080 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 123 ms
30,172 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 121 ms
28,000 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        Array.Sort(a);
        var t = a[1] - a[0];
        for (int i = 1; i < n; i++)
            if (a[i + 1] - a[i] != t) { Console.WriteLine("NO"); goto end; }
        Console.WriteLine("YES");
        end:;
    }
}
0