結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-05-17 15:07:42 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 22,272 KB |
| 最終ジャッジ日時 | 2026-09-10 23:23:49 |
| 合計ジャッジ時間 | 9,284 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 RE * 34 TLE * 1 -- * 4 |
ソースコード
n = int(input())
s = list(map(int, input().split()))
c = 0
for i in reversed(range(n)):
if s.index(i+1) == i :
s.remove(i+1)
else:
c += len(s)-s.index(i+1)-1
s1 = s*2
s = s1[s.index(i+1)+1: i-1+s.index(i)]
print(c)