結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
32,844 KB
testcase_01 AC 26 ms
23,984 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 26 ms
25,704 KB
testcase_05 AC 26 ms
23,916 KB
testcase_06 AC 25 ms
23,660 KB
testcase_07 AC 26 ms
23,796 KB
testcase_08 AC 26 ms
24,036 KB
testcase_09 AC 26 ms
24,044 KB
testcase_10 AC 26 ms
23,656 KB
testcase_11 AC 27 ms
23,920 KB
testcase_12 AC 26 ms
23,656 KB
testcase_13 AC 27 ms
25,792 KB
testcase_14 AC 26 ms
25,908 KB
testcase_15 AC 26 ms
23,856 KB
testcase_16 AC 486 ms
30,232 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 = new List<Int32>();

        static void Main()
        {
            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