結果

問題 No.365 ジェンガソート
ユーザー #ラス+#ラス+
提出日時 2019-10-11 08:02:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 838 bytes
コンパイル時間 906 ms
コンパイル使用メモリ 107,008 KB
実行使用メモリ 24,960 KB
最終ジャッジ日時 2024-05-03 03:32:31
合計ジャッジ時間 3,857 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
17,792 KB
testcase_01 AC 25 ms
17,536 KB
testcase_02 AC 24 ms
17,920 KB
testcase_03 AC 24 ms
17,792 KB
testcase_04 AC 24 ms
17,792 KB
testcase_05 AC 24 ms
17,792 KB
testcase_06 AC 24 ms
17,792 KB
testcase_07 AC 23 ms
17,792 KB
testcase_08 AC 23 ms
18,048 KB
testcase_09 AC 24 ms
17,792 KB
testcase_10 AC 23 ms
17,664 KB
testcase_11 AC 23 ms
17,920 KB
testcase_12 AC 23 ms
17,792 KB
testcase_13 AC 23 ms
17,792 KB
testcase_14 AC 24 ms
18,048 KB
testcase_15 AC 24 ms
17,664 KB
testcase_16 AC 53 ms
23,296 KB
testcase_17 AC 58 ms
24,192 KB
testcase_18 AC 30 ms
18,944 KB
testcase_19 AC 57 ms
24,064 KB
testcase_20 AC 38 ms
20,216 KB
testcase_21 AC 36 ms
19,968 KB
testcase_22 AC 52 ms
23,588 KB
testcase_23 AC 42 ms
21,632 KB
testcase_24 AC 51 ms
23,252 KB
testcase_25 AC 35 ms
19,840 KB
testcase_26 AC 45 ms
21,844 KB
testcase_27 AC 59 ms
24,576 KB
testcase_28 AC 46 ms
21,976 KB
testcase_29 AC 56 ms
24,064 KB
testcase_30 AC 47 ms
22,212 KB
testcase_31 AC 38 ms
20,008 KB
testcase_32 AC 36 ms
20,096 KB
testcase_33 AC 59 ms
24,576 KB
testcase_34 AC 33 ms
19,456 KB
testcase_35 AC 51 ms
23,300 KB
testcase_36 AC 59 ms
24,704 KB
testcase_37 AC 59 ms
24,832 KB
testcase_38 AC 60 ms
24,704 KB
testcase_39 AC 60 ms
24,960 KB
testcase_40 AC 61 ms
24,960 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.IO;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
class Start{
  static void Solve(){
    var n=int.Parse(ReadLine());
    var s=ReadLine().Split();
    var ans=n;
    for(int i=n-1;i>=0;i--)if(int.Parse(s[i])==ans)ans--;
    WriteLine(ans);
  }
  static void Main(){
    var sw=new StreamWriter(OpenStandardOutput()){AutoFlush=false};
    SetOut(sw);
    Solve();
    Out.Flush();
  }
  const long MOD=1000000007L;
  static void Swap<T>(ref T a,ref T b){T c=a;a=b;b=c;}
}
class Pair<T1,T2>:IComparable<Pair<T1,T2>>where T1:IComparable<T1>where T2:IComparable<T2>{
  public T1 F;public T2 S;
  public Pair(T1 f,T2 s){F=f;S=s;}
  public int CompareTo(Pair<T1,T2> p)=>F.CompareTo(p.F)!=0?F.CompareTo(p.F):S.CompareTo(p.S);
  public override string ToString()=>F+" "+S;
}
0