結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-24 18:21:22 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 890 bytes |
| コンパイル時間 | 1,364 ms |
| コンパイル使用メモリ | 103,808 KB |
| 実行使用メモリ | 30,336 KB |
| 最終ジャッジ日時 | 2024-10-04 02:57:11 |
| 合計ジャッジ時間 | 5,743 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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;
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;
}
}
}