結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-29 22:52:13 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 288 bytes |
| 記録 | |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 77,456 KB |
| 最終ジャッジ日時 | 2025-12-03 20:35:03 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 27 |
ソースコード
# -*- 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 and len(a) >= ans:
x = a.pop()
if x == k:
k -= 1
else:
ans += 1
print ans