結果
| 問題 | No.412 花火大会 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-13 19:00:07 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 2,000 ms |
| コード長 | 851 bytes |
| 記録 | |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 62,592 KB |
| 実行使用メモリ | 22,528 KB |
| 最終ジャッジ日時 | 2026-05-09 14:26:07 |
| 合計ジャッジ時間 | 1,609 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 09 MAY 2026 02:26:04 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.068
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((b (read))
(c (read))
(d (read))
(n (read))
(a (sort (make-array 3 :initial-contents (list b c d)) #'<))
(e (make-array n :element-type 'integer))
(res 0))
(dotimes (i n) (setf (aref e i) (read)))
(sort e #'<)
(loop for i from (1- n) downto 2
when (>= (aref e i) (aref a 2))
do (loop for j from (1- i) downto 1
when (>= (aref e j) (aref a 1))
do (loop for k from (1- j) downto 0
when (>= (aref e k) (aref a 0))
do (let ((f 1))
(dotimes (l k) (setq f (* f 2)))
(incf res f)))))
(format t "~d~%" res)))
(main)
Common Lisp