結果

問題 No.135 とりあえず1次元の問題
ユーザー keymoonkeymoon
提出日時 2019-02-23 16:13:46
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 548 bytes
コンパイル時間 3,084 ms
コンパイル使用メモリ 103,504 KB
実行使用メモリ 35,456 KB
最終ジャッジ日時 2023-08-20 06:40:19
合計ジャッジ時間 6,640 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 164 ms
35,456 KB
testcase_01 AC 66 ms
21,840 KB
testcase_02 AC 67 ms
23,852 KB
testcase_03 WA -
testcase_04 AC 68 ms
21,808 KB
testcase_05 AC 68 ms
23,804 KB
testcase_06 AC 67 ms
21,824 KB
testcase_07 AC 68 ms
21,720 KB
testcase_08 AC 68 ms
23,808 KB
testcase_09 AC 69 ms
23,712 KB
testcase_10 AC 69 ms
21,820 KB
testcase_11 AC 67 ms
19,716 KB
testcase_12 AC 76 ms
19,872 KB
testcase_13 AC 68 ms
21,768 KB
testcase_14 AC 76 ms
19,932 KB
testcase_15 AC 77 ms
22,052 KB
testcase_16 AC 75 ms
22,052 KB
testcase_17 AC 77 ms
22,032 KB
testcase_18 AC 75 ms
24,000 KB
testcase_19 AC 76 ms
24,136 KB
testcase_20 AC 77 ms
26,120 KB
testcase_21 AC 115 ms
28,508 KB
testcase_22 AC 168 ms
35,452 KB
evil01.txt AC 167 ms
35,416 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 ? -1 : c.Zip(c.Skip(1), (x, y) => y - x).Min());
    }
}
0