結果

問題 No.365 ジェンガソート
ユーザー #ラス+#ラス+
提出日時 2019-10-11 08:02:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 838 bytes
コンパイル時間 1,844 ms
コンパイル使用メモリ 65,696 KB
実行使用メモリ 28,448 KB
最終ジャッジ日時 2023-08-15 16:29:50
合計ジャッジ時間 6,111 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
20,668 KB
testcase_01 AC 49 ms
22,656 KB
testcase_02 AC 48 ms
20,724 KB
testcase_03 AC 48 ms
20,668 KB
testcase_04 AC 48 ms
20,644 KB
testcase_05 AC 48 ms
20,764 KB
testcase_06 AC 49 ms
22,704 KB
testcase_07 AC 49 ms
20,712 KB
testcase_08 AC 48 ms
22,612 KB
testcase_09 AC 49 ms
20,708 KB
testcase_10 AC 48 ms
18,740 KB
testcase_11 AC 49 ms
20,708 KB
testcase_12 AC 48 ms
20,732 KB
testcase_13 AC 48 ms
20,596 KB
testcase_14 AC 48 ms
20,660 KB
testcase_15 AC 48 ms
20,636 KB
testcase_16 AC 74 ms
25,652 KB
testcase_17 AC 81 ms
26,292 KB
testcase_18 AC 59 ms
19,160 KB
testcase_19 AC 78 ms
28,164 KB
testcase_20 AC 63 ms
21,732 KB
testcase_21 AC 60 ms
19,716 KB
testcase_22 AC 74 ms
25,664 KB
testcase_23 AC 67 ms
24,712 KB
testcase_24 AC 75 ms
25,684 KB
testcase_25 AC 62 ms
23,672 KB
testcase_26 AC 69 ms
22,548 KB
testcase_27 AC 80 ms
28,388 KB
testcase_28 AC 69 ms
22,636 KB
testcase_29 AC 87 ms
26,040 KB
testcase_30 AC 80 ms
20,688 KB
testcase_31 AC 71 ms
21,608 KB
testcase_32 AC 67 ms
21,868 KB
testcase_33 AC 80 ms
26,328 KB
testcase_34 AC 62 ms
21,512 KB
testcase_35 AC 76 ms
23,504 KB
testcase_36 AC 84 ms
26,488 KB
testcase_37 AC 87 ms
28,448 KB
testcase_38 AC 89 ms
26,444 KB
testcase_39 AC 83 ms
26,476 KB
testcase_40 AC 84 ms
26,424 KB
権限があれば一括ダウンロードができます

ソースコード

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