結果
| 問題 | No.999 てん vs. ほむ |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-02 21:13:00 |
| 言語 | Common Lisp (sbcl 2.6.9) |
| 結果 |
AC
不安定
|
| 実行時間 | 74 ms / 2,000 ms |
| + 828µs | |
| コード長 | 495 bytes |
| 記録 | |
| コンパイル時間 | 20 ms |
| コンパイル使用メモリ | 34,728 KB |
| 実行使用メモリ | 30,700 KB |
| 最終ジャッジ日時 | 2026-10-12 05:29:01 |
| 合計ジャッジ時間 | 3,238 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 12 OCT 2026 05:28:58 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.009
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(a (make-array 200005))
(b (make-array n :initial-element 0)))
(dotimes (i (* 2 n)) (setf (aref a i) (read)))
(dotimes (i n) (setf (aref b i) (- (aref a (1+ (* 2 i))) (aref a (* 2 i)))))
(loop with ans = (reduce #'+ b)
with c = ans
for i below n
do (decf c (* 2 (aref b i)))
(setq ans (max ans c))
finally (format t "~d~%" ans))))
(main)
Common Lisp