結果

問題 No.365 ジェンガソート
ユーザー boya978boya978
提出日時 2020-05-03 15:04:24
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 563 bytes
コンパイル時間 3,427 ms
コンパイル使用メモリ 96,740 KB
実行使用メモリ 29,812 KB
最終ジャッジ日時 2023-09-02 23:04:07
合計ジャッジ時間 9,330 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,624 KB
testcase_01 AC 60 ms
21,560 KB
testcase_02 AC 62 ms
21,704 KB
testcase_03 AC 62 ms
19,724 KB
testcase_04 AC 62 ms
21,704 KB
testcase_05 AC 61 ms
21,620 KB
testcase_06 AC 61 ms
23,636 KB
testcase_07 AC 60 ms
21,620 KB
testcase_08 AC 61 ms
23,688 KB
testcase_09 AC 60 ms
21,672 KB
testcase_10 AC 60 ms
21,604 KB
testcase_11 AC 62 ms
19,568 KB
testcase_12 AC 60 ms
21,564 KB
testcase_13 AC 61 ms
21,676 KB
testcase_14 AC 60 ms
23,724 KB
testcase_15 AC 60 ms
19,596 KB
testcase_16 AC 92 ms
24,948 KB
testcase_17 AC 95 ms
25,612 KB
testcase_18 AC 70 ms
22,140 KB
testcase_19 AC 96 ms
27,412 KB
testcase_20 AC 77 ms
22,676 KB
testcase_21 AC 75 ms
22,672 KB
testcase_22 AC 92 ms
26,904 KB
testcase_23 AC 81 ms
23,720 KB
testcase_24 AC 92 ms
28,804 KB
testcase_25 AC 76 ms
22,740 KB
testcase_26 AC 87 ms
21,668 KB
testcase_27 AC 100 ms
27,720 KB
testcase_28 AC 88 ms
23,840 KB
testcase_29 AC 97 ms
27,400 KB
testcase_30 AC 91 ms
23,792 KB
testcase_31 AC 77 ms
24,708 KB
testcase_32 AC 78 ms
22,720 KB
testcase_33 AC 101 ms
29,672 KB
testcase_34 AC 75 ms
26,528 KB
testcase_35 AC 91 ms
26,844 KB
testcase_36 AC 100 ms
27,904 KB
testcase_37 AC 100 ms
27,832 KB
testcase_38 AC 101 ms
29,812 KB
testcase_39 AC 100 ms
27,848 KB
testcase_40 AC 100 ms
27,876 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;
public class Hello{
    public static void Main(){
        
            int n=int.Parse(Console.ReadLine());
            var blocks = Console.ReadLine().Split().Select(int.Parse).ToArray();
            
            int x=n;
            int c=0;
            
            for(int i=blocks.Length-1;i>=0;i--)
            {
                if(blocks[i]==x)
                {
                    x--;
                    c++;        
                }    
            }
            
            Console.WriteLine(n-c);
        
    }
}
0