結果

問題 No.135 とりあえず1次元の問題
ユーザー keymoonkeymoon
提出日時 2019-02-23 16:14:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 171 ms / 5,000 ms
コード長 547 bytes
コンパイル時間 2,291 ms
コンパイル使用メモリ 105,360 KB
実行使用メモリ 35,404 KB
最終ジャッジ日時 2023-08-20 06:41:25
合計ジャッジ時間 5,642 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 171 ms
35,404 KB
testcase_01 AC 68 ms
21,876 KB
testcase_02 AC 69 ms
21,800 KB
testcase_03 AC 65 ms
23,808 KB
testcase_04 AC 70 ms
21,832 KB
testcase_05 AC 68 ms
21,708 KB
testcase_06 AC 69 ms
23,832 KB
testcase_07 AC 69 ms
23,840 KB
testcase_08 AC 69 ms
19,788 KB
testcase_09 AC 68 ms
21,840 KB
testcase_10 AC 69 ms
21,888 KB
testcase_11 AC 68 ms
21,836 KB
testcase_12 AC 76 ms
19,956 KB
testcase_13 AC 70 ms
23,796 KB
testcase_14 AC 79 ms
22,044 KB
testcase_15 AC 77 ms
21,928 KB
testcase_16 AC 78 ms
24,088 KB
testcase_17 AC 78 ms
24,056 KB
testcase_18 AC 78 ms
22,016 KB
testcase_19 AC 79 ms
21,952 KB
testcase_20 AC 81 ms
22,052 KB
testcase_21 AC 115 ms
28,584 KB
testcase_22 AC 171 ms
33,336 KB
evil01.txt AC 169 ms
35,492 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.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;

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