結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
hang_hang_cln
|
| 提出日時 | 2018-06-10 23:26:05 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 407 bytes |
| 記録 | |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 38,580 KB |
| 最終ジャッジ日時 | 2026-03-20 13:40:48 |
| 合計ジャッジ時間 | 71,779 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 TLE * 22 |
ソースコード
N = int(input())
a = list(map(int,input().split()))
def checkALL(numList):
for i in range(len(numList)):
if numList[i] != i+1:
return False
return True
cnt = 0
for i in range(len(a)):
if checkALL(a):
break
elif a[a.index(i+1)] == i:
continue
else:
cnt += 1
del a[a.index(i+1)]
a.insert(i, i+1)
# print(a)
print(cnt)
hang_hang_cln