結果

問題 No.627 ランダムウォークの軌跡
ユーザー Common Lisp
提出日時 2024-10-11 18:11:39
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 433 bytes
コンパイル時間 1,435 ms
コンパイル使用メモリ 27,264 KB
実行使用メモリ 22,144 KB
最終ジャッジ日時 2024-10-11 18:11:43
合計ジャッジ時間 1,678 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 11 OCT 2024 06:11:40 PM):

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

ソースコード

diff #

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((n (read))
         (xs (loop repeat n collect (read)))
         (ans 'T))
    (if (/= (abs (car xs)) 1)
        (setq ans 'F)
        (loop for x on xs
              while (< 1 (length x))
              as a = (car x)
              as b = (cadr x)
              when (/= (abs (- a b)) 1)
                do (setq ans 'F) (return)))
    (princ ans)
    (terpri)))
(main)
0