結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-29 22:53:23 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 188 ms / 2,000 ms |
| コード長 | 270 bytes |
| 記録 | |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 77,512 KB |
| 最終ジャッジ日時 | 2025-12-03 20:35:19 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
N = int(raw_input())
a = map(int, raw_input().split())
ans = 0
k = N
while a:
x = a.pop()
if x == k:
k -= 1
else:
ans += 1
print ans