結果

問題 No.406 鴨等間隔の法則
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-06-21 02:00:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 441 bytes
コンパイル時間 1,999 ms
コンパイル使用メモリ 105,716 KB
実行使用メモリ 32,320 KB
最終ジャッジ日時 2023-09-21 18:50:48
合計ジャッジ時間 6,834 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
26,108 KB
testcase_01 AC 61 ms
21,540 KB
testcase_02 AC 61 ms
21,600 KB
testcase_03 AC 61 ms
21,540 KB
testcase_04 AC 139 ms
29,632 KB
testcase_05 AC 93 ms
25,772 KB
testcase_06 AC 95 ms
23,888 KB
testcase_07 AC 94 ms
21,912 KB
testcase_08 AC 136 ms
29,576 KB
testcase_09 AC 145 ms
32,156 KB
testcase_10 AC 98 ms
24,112 KB
testcase_11 AC 128 ms
28,840 KB
testcase_12 AC 105 ms
26,760 KB
testcase_13 AC 102 ms
24,720 KB
testcase_14 AC 132 ms
31,204 KB
testcase_15 AC 71 ms
22,200 KB
testcase_16 AC 73 ms
24,276 KB
testcase_17 AC 70 ms
21,988 KB
testcase_18 AC 72 ms
22,296 KB
testcase_19 AC 74 ms
22,304 KB
testcase_20 AC 76 ms
22,624 KB
testcase_21 AC 76 ms
22,612 KB
testcase_22 AC 84 ms
25,388 KB
testcase_23 AC 109 ms
26,980 KB
testcase_24 AC 125 ms
28,628 KB
testcase_25 AC 146 ms
32,148 KB
testcase_26 AC 149 ms
32,260 KB
testcase_27 AC 126 ms
32,320 KB
testcase_28 AC 144 ms
30,204 KB
testcase_29 AC 146 ms
32,208 KB
testcase_30 AC 144 ms
32,200 KB
testcase_31 AC 142 ms
31,948 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.Linq;

class No406{
    static void Main(){
        var n=Int32.Parse(Console.ReadLine());
        var k=Console.ReadLine().Split(' ').Select(j=>Int32.Parse(j)).OrderBy(l=>l).ToArray();
        var a="YES";
        for(int i=1;i<n-1;++i){
            var d=k[1]-k[0];
            if(k[i+1]-k[i]!=d||d==0){
                a="NO";
                break;
            }
        }
        Console.WriteLine(a);
    }
}
0