結果
| 問題 | No.366 ロボットソート |
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-08-01 04:12:37 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 236 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 13,568 KB |
| 最終ジャッジ日時 | 2026-09-13 19:04:24 |
| 合計ジャッジ時間 | 2,994 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 23 |
ソースコード
#robot
N,K=(int(i) for i in input().split())
a=[int(i) for i in input().split()]
b=a.sort()
i=0
C=0
while i<N and C>=0:
j=i
while j<N and C>=0 and b[j]!=a[i]:
j+=K
C+=1
if j>=N:
C=-1
i+=1
print(C)
rocoder