結果
問題 | No.365 ジェンガソート |
ユーザー |
![]() |
提出日時 | 2017-02-28 02:31:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 572 bytes |
コンパイル時間 | 113 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 17,496 KB |
最終ジャッジ日時 | 2024-06-11 20:30:49 |
合計ジャッジ時間 | 2,849 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 41 |
ソースコード
def switch(list,x): y=list.pop(list.index(x)) list.insert(0,y) return list N=int(input()) list=list(map,(int,input().split())) cnt=0 #print(list) for i in range(N): #print(list[-1:],N-i) if list[-1:]==N-i: continue else: index=list.index(N-i) new_list=list[index+1:] for j in new_list: #print("new",new_list) list=switch(list,max(new_list)) new_list.remove(max(new_list)) cnt+=1 #print(cnt,list) list.remove(N-i) #print(list) print(cnt)