結果

問題 No.135 とりあえず1次元の問題
ユーザー _matumo__matumo_
提出日時 2018-08-07 10:19:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 850 ms
コンパイル使用メモリ 110,408 KB
実行使用メモリ 36,936 KB
最終ジャッジ日時 2023-10-19 22:25:28
合計ジャッジ時間 3,206 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
36,936 KB
testcase_01 AC 36 ms
25,640 KB
testcase_02 AC 36 ms
25,640 KB
testcase_03 AC 34 ms
25,500 KB
testcase_04 AC 36 ms
25,652 KB
testcase_05 AC 37 ms
25,648 KB
testcase_06 AC 38 ms
25,648 KB
testcase_07 AC 37 ms
25,648 KB
testcase_08 AC 38 ms
25,648 KB
testcase_09 AC 37 ms
25,652 KB
testcase_10 AC 37 ms
25,648 KB
testcase_11 AC 37 ms
25,652 KB
testcase_12 AC 41 ms
26,044 KB
testcase_13 AC 36 ms
25,660 KB
testcase_14 AC 42 ms
26,052 KB
testcase_15 AC 42 ms
26,044 KB
testcase_16 AC 42 ms
26,056 KB
testcase_17 AC 42 ms
26,052 KB
testcase_18 AC 42 ms
26,036 KB
testcase_19 AC 41 ms
26,052 KB
testcase_20 AC 41 ms
26,052 KB
testcase_21 AC 79 ms
32,000 KB
testcase_22 AC 137 ms
36,808 KB
evil01.txt AC 132 ms
36,972 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)
        {
            Console.ReadLine();
            var va = Console.ReadLine().Split().Select(int.Parse);
            var vb = va.Distinct().OrderBy(n => n).ToList();
            int nn = (vb.Count() <= 1) ? 0 : vb.Skip(1).Select((n, i) => n - vb[i]).Min();
            Console.WriteLine(nn);
            //Console.ReadLine();
        }
    }
}
0