(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (k (read)) (a (make-array n)) (b (make-array (1+ n) :initial-element 10000000000))) (loop for i from 0 below n do (setf (aref a i) (read))) (setf b (sort (copy-seq a) #'<)) (let ((x (aref b (1- k))) (c ())) (loop for i from 1 below n when (and (> (aref a i) x) (<= (aref a (1- i)) x)) do (push (1+ i) c)) (format t "~a~%~{~a~^ ~}~%" (length c) (reverse c))))) (main)