結果
| 問題 |
No.366 ロボットソート
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-08-01 04:12:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 236 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-11 05:42:40 |
| 合計ジャッジ時間 | 1,649 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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