結果

問題 No.1285 ゴミ捨て
ユーザー keymoonkeymoon
提出日時 2020-12-31 21:10:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 597 bytes
コンパイル時間 2,128 ms
コンパイル使用メモリ 105,356 KB
実行使用メモリ 29,064 KB
最終ジャッジ日時 2023-08-19 07:29:13
合計ジャッジ時間 5,711 ms
ジャッジサーバーID
(参考情報)
judge9 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
23,748 KB
testcase_01 AC 57 ms
23,800 KB
testcase_02 AC 57 ms
21,720 KB
testcase_03 AC 56 ms
21,600 KB
testcase_04 AC 55 ms
21,832 KB
testcase_05 AC 57 ms
21,880 KB
testcase_06 AC 56 ms
21,756 KB
testcase_07 AC 130 ms
26,724 KB
testcase_08 AC 62 ms
23,708 KB
testcase_09 AC 88 ms
21,888 KB
testcase_10 AC 119 ms
24,540 KB
testcase_11 AC 119 ms
22,400 KB
testcase_12 AC 99 ms
24,000 KB
testcase_13 AC 97 ms
26,004 KB
testcase_14 AC 130 ms
24,648 KB
testcase_15 AC 109 ms
26,240 KB
testcase_16 AC 73 ms
23,808 KB
testcase_17 AC 70 ms
21,864 KB
testcase_18 AC 70 ms
21,576 KB
testcase_19 AC 86 ms
23,748 KB
testcase_20 AC 69 ms
23,628 KB
testcase_21 AC 75 ms
23,732 KB
testcase_22 AC 135 ms
26,936 KB
testcase_23 AC 145 ms
29,064 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;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;

public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var a = Enumerable.Repeat(0, n).Select(_ => int.Parse(Console.ReadLine())).OrderBy(x => x).ToArray();

        Console.WriteLine(a.Length <= 1 || 2 <= a.Zip(a.Skip(1), (x, y) => y - x).Min() ? 1 : 2);
    }
}
0