結果

問題 No.1285 ゴミ捨て
ユーザー keymoonkeymoon
提出日時 2020-12-31 21:10:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 597 bytes
コンパイル時間 780 ms
コンパイル使用メモリ 105,984 KB
実行使用メモリ 23,936 KB
最終ジャッジ日時 2024-05-06 14:43:56
合計ジャッジ時間 2,996 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
18,816 KB
testcase_01 AC 27 ms
18,816 KB
testcase_02 AC 28 ms
19,072 KB
testcase_03 AC 27 ms
18,944 KB
testcase_04 AC 24 ms
18,688 KB
testcase_05 AC 28 ms
19,200 KB
testcase_06 AC 27 ms
18,944 KB
testcase_07 AC 102 ms
23,680 KB
testcase_08 AC 30 ms
19,072 KB
testcase_09 AC 59 ms
20,732 KB
testcase_10 AC 94 ms
22,784 KB
testcase_11 AC 90 ms
22,528 KB
testcase_12 AC 71 ms
21,504 KB
testcase_13 AC 71 ms
21,504 KB
testcase_14 AC 104 ms
23,552 KB
testcase_15 AC 81 ms
21,888 KB
testcase_16 AC 44 ms
19,616 KB
testcase_17 AC 44 ms
19,768 KB
testcase_18 AC 42 ms
19,720 KB
testcase_19 AC 60 ms
20,688 KB
testcase_20 AC 40 ms
19,636 KB
testcase_21 AC 46 ms
19,824 KB
testcase_22 AC 106 ms
23,680 KB
testcase_23 AC 112 ms
23,936 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