結果
| 問題 |
No.921 ずんだアロー
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-12 20:58:33 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 2,000 ms |
| コード長 | 461 bytes |
| コンパイル時間 | 327 ms |
| コンパイル使用メモリ | 33,084 KB |
| 実行使用メモリ | 22,016 KB |
| 最終ジャッジ日時 | 2024-11-12 20:58:36 |
| 合計ジャッジ時間 | 2,964 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 12 NOV 2024 08:58:34 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.006
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((*read-default-float-format* 'double-float)
(n (read))
(a 0)
(b 0)
(res 0))
(dotimes (_ n)
(let* ((x (read)))
(cond ((= x a) (setf res (1+ res)
b 1))
((not (zerop b)) (setf b 0))
(t (setf res (1+ res)
b 1)))
(setq a x)))
(format t "~d~%" res)))
(main)
Common Lisp