結果

問題 No.2774 Wake up Record 2
ユーザー Common Lisp
提出日時 2024-10-21 21:56:45
言語 Common Lisp
(sbcl 2.5.0)
結果
TLE  
実行時間 -
コード長 460 bytes
コンパイル時間 729 ms
コンパイル使用メモリ 33,364 KB
実行使用メモリ 39,924 KB
最終ジャッジ日時 2024-10-21 21:56:52
合計ジャッジ時間 6,413 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 TLE * 1 -- * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 21 OCT 2024 09:56:45 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.007

ソースコード

diff #

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