結果
| 問題 | No.1373 Directed Operations |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-05 21:54:19 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 692 bytes |
| 記録 | |
| コンパイル時間 | 991 ms |
| コンパイル使用メモリ | 27,776 KB |
| 実行使用メモリ | 23,936 KB |
| 最終ジャッジ日時 | 2026-03-23 20:23:55 |
| 合計ジャッジ時間 | 5,032 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 19 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 23 MAR 2026 08:23:50 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.035
ソースコード
(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)