結果

問題 No.365 ジェンガソート
ユーザー AreTrash
提出日時 2016-04-30 16:26:40
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 491 bytes
コンパイル時間 840 ms
コンパイル使用メモリ 108,692 KB
実行使用メモリ 32,276 KB
最終ジャッジ日時 2024-10-12 01:57:32
合計ジャッジ時間 3,815 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace No365_1{
    public class Program{
        public static void Main(string[] args){
            Console.ReadLine();
            var an = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);

            var seqMax = 0;
            var repMax = 0;

            foreach(var a in an){
                seqMax = Math.Max(seqMax, a);
                if(a < seqMax) repMax = Math.Max(repMax, a);
            }

            Console.WriteLine(repMax);
        }
    }
}
0