結果
| 問題 | No.1373 Directed Operations |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-05 21:54:19 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 692 bytes |
| 記録 | |
| コンパイル時間 | 1,253 ms |
| コンパイル使用メモリ | 27,776 KB |
| 実行使用メモリ | 25,088 KB |
| 最終ジャッジ日時 | 2024-07-02 12:25:57 |
| 合計ジャッジ時間 | 7,591 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 19 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 02 JUL 2024 12:25:49 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.040
ソースコード
(defvar n (read))
(defparameter a (sort (apply #'vector -100000000 (loop repeat (1- n)
collect (read))) #'<))
(defvar f nil)
(loop for i from 1 to (1- n)
until f
do (unless (<= (aref a i) i)
(setq f t)))
(if f
(progn (princ "No")
(fresh-line))
(progn (princ "Yes")
(fresh-line)
(loop for i from 1 to (1- n)
do (princ (1+ (- i (aref a i))))
(fresh-line))))
;(princ a)