結果
問題 |
No.2803 Bocching Star
|
ユーザー |
|
提出日時 | 2024-07-21 01:01:18 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,219 bytes |
コンパイル時間 | 349 ms |
コンパイル使用メモリ | 29,824 KB |
実行使用メモリ | 46,336 KB |
最終ジャッジ日時 | 2024-07-21 01:01:26 |
合計ジャッジ時間 | 6,142 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 34 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 21 JUL 2024 01:01:19 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.099
ソースコード
#-swank (unless (member :child-sbcl *features*) (quit :recklessly-p t :unix-status (process-exit-code (run-program *runtime-pathname* `("--control-stack-size" "1024MB" "--noinform" "--disable-ldb" "--lose-on-corruption" "--end-runtime-options" "--eval" "(push :child-sbcl *features*)" "--script" ,(namestring *load-pathname*)) :output t :error t :input t)))) (defun main () (let* ((N (read)) (S (read)) (P (loop for i from 1 to N collect (read))) (p (append (mapcar #'(lambda (x i) (list x (1+ i))) P (loop for i from 0 below N collect i)) (list (list (- (ash 1 60)) -1) (list (ash 1 60) -1))))) (setf p (sort p #'< :key #'first)) (let ((ans (loop for i from 1 below (1+ N) for near = (min (- (first (nth i p)) (first (nth (1- i) p))) (- (first (nth (1+ i) p)) (first (nth i p)))) if (> near S) collect (second (nth i p))))) (setf ans (sort ans #'<)) (format t "~D~%" (length ans)) (dolist (elem ans) (format t "~D " elem)) (terpri)))) (main)