結果
| 問題 | No.1374 Absolute Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-05 22:48:47 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 508 bytes |
| 記録 | |
| コンパイル時間 | 710 ms |
| コンパイル使用メモリ | 27,392 KB |
| 実行使用メモリ | 22,784 KB |
| 最終ジャッジ日時 | 2026-08-04 01:55:26 |
| 合計ジャッジ時間 | 2,978 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 20 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 04 AUG 2026 01:55:22 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.031
ソースコード
(defvar n (read))
(defvar c (apply #'vector (sort (loop repeat n
collect (read)) #'<)))
(defvar s (loop for i from 0 to (1- (floor n 2))
sum (aref c i)))
(defvar b (loop for i from (ceiling n 2) to (1- n)
sum (aref c i)))
(princ (if (evenp n)
(abs (- (abs s) (abs b)))
(max (abs (- (abs (+ s (aref c (floor n 2)))) (abs b)))
(abs (- (abs (+ b (aref c (floor n 2)))) (abs s))))))
(fresh-line)