結果

問題 No.239 にゃんぱすー
コンテスト
ユーザー Takashi_Oda
提出日時 2026-06-08 03:16:55
言語 Common Lisp
(sbcl 2.6.7)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 20 ms / 2,000 ms
+ 168µs
コード長 670 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 796 ms
コンパイル使用メモリ 39,336 KB
実行使用メモリ 32,664 KB
最終ジャッジ日時 2026-10-11 13:34:08
合計ジャッジ時間 2,772 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 11 OCT 2026 01:34:04 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.029

ソースコード

diff #
raw source code

(defun solve () 
    (let* ((n (read)) (a 0) (ren-like (make-array n :initial-element 0)))
    (dotimes (i n)
        (dotimes (j n)
            (if (equal (read) 'NYANPASS) (setf (aref ren-like j) (1+ (aref ren-like j))))))
    (dotimes (i n)
        (if (= (- n 1) (aref ren-like i))
            (cond 
                ((= a 0) (setf a (+ i 1)))
                ((>= a 1) (setf a -1)))))
    (if (= a 0) (setf a -1))
    a))
;つかれたーーーーーーーーーーーーーーーーーーーーー
;文字列の読み込みってもっと簡単にならないんかーーーーーーーーーーーーーーーー

(defun main () (format t "~A~%" (solve)))

(main)
0