結果

問題 No.365 ジェンガソート
ユーザー yun_appyun_app
提出日時 2016-05-09 19:06:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 894 bytes
コンパイル時間 2,367 ms
コンパイル使用メモリ 75,288 KB
実行使用メモリ 69,052 KB
最終ジャッジ日時 2024-04-15 14:56:14
合計ジャッジ時間 10,337 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 53 ms
50,260 KB
testcase_02 AC 55 ms
49,868 KB
testcase_03 AC 55 ms
50,368 KB
testcase_04 WA -
testcase_05 AC 54 ms
50,256 KB
testcase_06 AC 55 ms
50,296 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 56 ms
50,340 KB
testcase_11 WA -
testcase_12 AC 57 ms
50,168 KB
testcase_13 AC 56 ms
50,264 KB
testcase_14 AC 55 ms
49,936 KB
testcase_15 AC 55 ms
50,080 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 131 ms
54,212 KB
testcase_22 AC 234 ms
62,412 KB
testcase_23 AC 181 ms
58,180 KB
testcase_24 AC 236 ms
62,684 KB
testcase_25 AC 128 ms
54,300 KB
testcase_26 WA -
testcase_27 AC 286 ms
66,128 KB
testcase_28 AC 212 ms
60,240 KB
testcase_29 AC 247 ms
63,112 KB
testcase_30 AC 216 ms
60,208 KB
testcase_31 AC 156 ms
57,124 KB
testcase_32 AC 139 ms
57,144 KB
testcase_33 AC 286 ms
66,424 KB
testcase_34 AC 115 ms
54,180 KB
testcase_35 WA -
testcase_36 AC 298 ms
69,052 KB
testcase_37 AC 274 ms
66,148 KB
testcase_38 WA -
testcase_39 AC 286 ms
66,296 KB
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String[] lines = br.readLine().split(" ");
        HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
        int idx = 0;
        for(String st:lines){
            map.put(Integer.parseInt(st),idx++);
        }
        int tmp = n;
        int ans;
        for(ans = n;ans>0;ans--){
            if(map.get(ans) > tmp){
                break;
            }
            tmp = map.get(n);
        }
        System.out.println(ans);
    }
}
0