結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-29 21:00:57 |
| 言語 | Common Lisp (sbcl 2.6.9) |
| 結果 |
AC
不安定
|
| 実行時間 | 6 ms / 1,000 ms |
| + 38µs | |
| コード長 | 611 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 40,536 KB |
| 実行使用メモリ | 19,968 KB |
| 最終ジャッジ日時 | 2026-10-11 08:34:28 |
| 合計ジャッジ時間 | 1,343 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 11 OCT 2026 08:34:25 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.049
ソースコード
(defvar N)
(setq N (parse-integer (read-line)))
(defvar X)
(defvar Y)
(defvar temp)
(setq temp (read-line))
(setq temp (read-from-string (concatenate 'string "(" temp ")" )))
(setq X (nth 0 temp))
(setq Y (nth 1 temp))
;(print X)
;(print Y)
(defvar ans)
(setq ans (- Y X))
(if (<= ans 0) (progn (format t "-1~%") (quit)))
(loop for i from 2 to N do
(setq temp (read-line))
(setq temp (read-from-string (concatenate 'string "(" temp ")" )))
(setq X (nth 0 temp))
(setq Y (nth 1 temp))
(if (not (= (- Y X) ans)) (progn (format t "-1~%") (quit)))
)
(format t "~d~%" ans)