結果

問題 No.365 ジェンガソート
ユーザー どららどらら
提出日時 2016-04-30 00:56:59
言語 Go
(1.22.1)
結果
AC  
実行時間 614 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 12,932 ms
コンパイル使用メモリ 238,784 KB
実行使用メモリ 7,828 KB
最終ジャッジ日時 2024-04-20 06:45:53
合計ジャッジ時間 23,154 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 1 ms
6,812 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 1 ms
6,940 KB
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 452 ms
7,828 KB
testcase_17 AC 576 ms
7,828 KB
testcase_18 AC 42 ms
6,944 KB
testcase_19 AC 537 ms
7,824 KB
testcase_20 AC 177 ms
6,944 KB
testcase_21 AC 141 ms
6,944 KB
testcase_22 AC 476 ms
7,824 KB
testcase_23 AC 266 ms
6,944 KB
testcase_24 AC 420 ms
7,824 KB
testcase_25 AC 120 ms
6,940 KB
testcase_26 AC 355 ms
7,700 KB
testcase_27 AC 598 ms
7,824 KB
testcase_28 AC 344 ms
7,824 KB
testcase_29 AC 551 ms
7,828 KB
testcase_30 AC 347 ms
7,824 KB
testcase_31 AC 142 ms
6,940 KB
testcase_32 AC 135 ms
6,940 KB
testcase_33 AC 595 ms
7,824 KB
testcase_34 AC 97 ms
6,940 KB
testcase_35 AC 434 ms
7,824 KB
testcase_36 AC 575 ms
7,824 KB
testcase_37 AC 614 ms
7,824 KB
testcase_38 AC 589 ms
7,828 KB
testcase_39 AC 613 ms
7,824 KB
testcase_40 AC 613 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
)

func main() {
	var N int
	var arr [100005]int

	fmt.Scan(&N)
	for i := 0; i < N; i++ {
		fmt.Scan(&arr[i])
	}

	ret := 0
	x := 0
	y := N
	for i := N - 1; i >= 0; i-- {
		if y == arr[i] {
			y--
			x++
		}
	}
	ret = N - x

	fmt.Println(ret)
}
0