結果

問題 No.365 ジェンガソート
ユーザー ebicochinealebicochineal
提出日時 2016-05-12 16:52:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 1,036 bytes
コンパイル時間 2,129 ms
コンパイル使用メモリ 112,924 KB
実行使用メモリ 33,096 KB
最終ジャッジ日時 2024-04-20 07:09:38
合計ジャッジ時間 3,460 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
25,260 KB
testcase_01 AC 23 ms
25,104 KB
testcase_02 AC 26 ms
27,112 KB
testcase_03 AC 25 ms
25,204 KB
testcase_04 AC 24 ms
25,348 KB
testcase_05 AC 23 ms
26,996 KB
testcase_06 AC 25 ms
26,992 KB
testcase_07 AC 26 ms
25,196 KB
testcase_08 AC 24 ms
25,324 KB
testcase_09 AC 23 ms
25,068 KB
testcase_10 AC 23 ms
25,072 KB
testcase_11 AC 24 ms
25,264 KB
testcase_12 AC 23 ms
25,136 KB
testcase_13 AC 24 ms
23,220 KB
testcase_14 AC 25 ms
24,952 KB
testcase_15 AC 24 ms
27,240 KB
testcase_16 AC 47 ms
32,356 KB
testcase_17 AC 52 ms
33,048 KB
testcase_18 AC 29 ms
25,840 KB
testcase_19 AC 57 ms
30,972 KB
testcase_20 AC 37 ms
26,224 KB
testcase_21 AC 34 ms
26,488 KB
testcase_22 AC 47 ms
30,184 KB
testcase_23 AC 39 ms
29,540 KB
testcase_24 AC 47 ms
32,208 KB
testcase_25 AC 34 ms
26,672 KB
testcase_26 AC 43 ms
29,260 KB
testcase_27 AC 63 ms
31,428 KB
testcase_28 AC 45 ms
29,432 KB
testcase_29 AC 51 ms
32,792 KB
testcase_30 AC 43 ms
27,184 KB
testcase_31 AC 35 ms
26,512 KB
testcase_32 AC 35 ms
26,416 KB
testcase_33 AC 54 ms
33,096 KB
testcase_34 AC 32 ms
24,240 KB
testcase_35 AC 48 ms
30,220 KB
testcase_36 AC 54 ms
29,584 KB
testcase_37 AC 55 ms
31,360 KB
testcase_38 AC 53 ms
31,148 KB
testcase_39 AC 52 ms
31,100 KB
testcase_40 AC 54 ms
31,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;
using System.Collections;
using System.Collections.Generic;

public class P{
    public static void Main(){
        int n = InputToInt();
        int[] m = Input().Split().MapInt();
        for(int i=n; i>0; --i){if(m[i-1]==n){--n;}}
        Print(n);
    }
    
    public static void Print(params object[] o){
        for(int i=0; i<o.Length; ++i){
            Console.Write(o[i]);
            Console.Write(i==o.Length-1 ? '\n' : ' ');
        }
    }
    public static string Input(){return Console.ReadLine();}
    public static int InputToInt(){return int.Parse(Console.ReadLine());}
}

public static class StringArrayExtensions{
    public static int[] MapInt(this string[] s){return s.Select(int.Parse).ToArray();}
    public static long[] MapLong(this string[] s){return s.Select(long.Parse).ToArray();}
    public static float[] MapFloat(this string[] s){return s.Select(float.Parse).ToArray();}
    public static double[] MapDouble(this string[] s){return s.Select(double.Parse).ToArray();}
}
0