結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-24 18:18:10 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 868 bytes |
| コンパイル時間 | 933 ms |
| コンパイル使用メモリ | 109,104 KB |
| 実行使用メモリ | 34,740 KB |
| 最終ジャッジ日時 | 2024-10-04 02:56:58 |
| 合計ジャッジ時間 | 5,869 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 2 TLE * 1 -- * 23 |
コンパイルメッセージ
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()
{
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;
}
}
}