結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2017-06-24 18:11:55 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 816 bytes |
コンパイル時間 | 2,513 ms |
コンパイル使用メモリ | 108,808 KB |
実行使用メモリ | 28,072 KB |
最終ジャッジ日時 | 2024-10-04 02:56:13 |
合計ジャッジ時間 | 3,849 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 39 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; namespace MobProgramming { class JengaSort { private static List<Int32> _ryoList = new List<Int32>(); static void Main() { String[] s = Console.ReadLine().Split(' '); Initialize(s); Console.WriteLine(CountRyo(_ryoList.Count)); } 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; } } }