結果

問題 No.365 ジェンガソート
ユーザー KayskayKayskay
提出日時 2017-06-24 18:21:22
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 890 bytes
コンパイル時間 1,008 ms
コンパイル使用メモリ 107,248 KB
実行使用メモリ 37,416 KB
最終ジャッジ日時 2024-04-14 22:37:04
合計ジャッジ時間 5,736 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
31,360 KB
testcase_01 AC 26 ms
21,944 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 26 ms
23,916 KB
testcase_05 AC 26 ms
23,792 KB
testcase_06 AC 26 ms
23,860 KB
testcase_07 AC 26 ms
24,044 KB
testcase_08 AC 26 ms
23,916 KB
testcase_09 AC 25 ms
23,984 KB
testcase_10 AC 25 ms
24,124 KB
testcase_11 AC 26 ms
25,960 KB
testcase_12 AC 26 ms
24,116 KB
testcase_13 AC 26 ms
23,852 KB
testcase_14 AC 26 ms
21,808 KB
testcase_15 AC 26 ms
24,108 KB
testcase_16 AC 471 ms
31,816 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Generic;

namespace MobProgramming
{
    class JengaSort
    {
        private static List<Int32> _ryoList;

        static void Main()
        {
            _ryoList = new List<Int32>();
            Int32 length = Int32.Parse(Console.ReadLine());
            String[] s = Console.ReadLine().Split(' ');
            Initialize(s);
            Console.WriteLine(CountRyo(length));

        }

        static void Initialize(String[] strArray)
        {
            foreach (var str in strArray)
            {
                _ryoList.Add(Int32.Parse(str));
            }
        }

        static Int32 CountRyo(Int32 num)
        {
            if (_ryoList.IndexOf(num) > _ryoList.IndexOf(num - 1))
            {
                var result = CountRyo(num - 1);
                return result;
            }
            return num - 1;
        }
    }
}
0