結果

問題 No.406 鴨等間隔の法則
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-06-21 01:56:22
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 2,284 ms
コンパイル使用メモリ 104,180 KB
実行使用メモリ 32,328 KB
最終ジャッジ日時 2023-09-13 07:30:31
合計ジャッジ時間 6,975 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
24,388 KB
testcase_01 AC 62 ms
21,736 KB
testcase_02 AC 63 ms
23,688 KB
testcase_03 WA -
testcase_04 AC 140 ms
31,696 KB
testcase_05 AC 94 ms
23,772 KB
testcase_06 AC 97 ms
25,736 KB
testcase_07 AC 99 ms
23,992 KB
testcase_08 AC 141 ms
29,528 KB
testcase_09 AC 147 ms
32,192 KB
testcase_10 AC 100 ms
24,140 KB
testcase_11 AC 129 ms
28,792 KB
testcase_12 AC 107 ms
24,800 KB
testcase_13 AC 106 ms
26,716 KB
testcase_14 AC 137 ms
29,096 KB
testcase_15 WA -
testcase_16 AC 75 ms
20,292 KB
testcase_17 AC 73 ms
21,944 KB
testcase_18 AC 75 ms
24,372 KB
testcase_19 AC 76 ms
24,440 KB
testcase_20 AC 77 ms
22,792 KB
testcase_21 AC 80 ms
24,668 KB
testcase_22 AC 86 ms
21,436 KB
testcase_23 AC 111 ms
29,168 KB
testcase_24 AC 125 ms
28,616 KB
testcase_25 AC 148 ms
32,328 KB
testcase_26 AC 148 ms
30,264 KB
testcase_27 WA -
testcase_28 AC 147 ms
30,196 KB
testcase_29 AC 147 ms
30,248 KB
testcase_30 AC 146 ms
32,116 KB
testcase_31 AC 145 ms
29,944 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 d=k[1]-k[0];
        var a="YES";
        for(int i=1;i<n-1;++i){
            if(k[i+1]-k[i]!=d){
                a="NO";
                break;
            }
        }
        Console.WriteLine(a);
    }
}
0