結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-20 21:34:25 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 5,000 ms |
| コード長 | 518 bytes |
| 記録 | |
| コンパイル時間 | 992 ms |
| コンパイル使用メモリ | 34,368 KB |
| 実行使用メモリ | 25,600 KB |
| 最終ジャッジ日時 | 2026-07-10 03:15:52 |
| 合計ジャッジ時間 | 2,409 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 10 JUL 2026 03:15:49 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.102
ソースコード
(defvar temp)
(setq temp (read-from-string (concatenate 'string "(" (read-line) ")")))
(defparameter N (nth 0 temp))
(defparameter M (nth 1 temp))
(defparameter A (read-from-string (concatenate 'string "(" (read-line) ")")))
(defparameter C (make-array (+ N 1)))
(loop for i from 1 to N do
(setf (aref C i) i)
)
;(print C)
(loop for i in A do
(setq temp (aref C i))
(loop for j from i downto 2 do
(setf (aref C j) (aref C (- j 1)))
)
(setf (aref C 1) temp)
;(print C)
)
(format t "~d~%" (aref C 1))